D
DC
I have this datagrid:
<aspataGrid id="dgList" runat="server" Width="100%" CssClass="BodyText"
AllowPaging="True" AllowSorting="True"
AutoGenerateColumns="False" PageSize="20" BorderColor="#CC9966"
BorderStyle="None" BorderWidth="1px"
BackColor="White" CellPadding="4" HorizontalAlign="Right">
<SelectedItemStyle Font-Bold="True" ForeColor="#663399"
BackColor="#FFCC66"></SelectedItemStyle>
<ItemStyle ForeColor="#330099" BackColor="White"></ItemStyle>
<HeaderStyle Font-Bold="True" ForeColor="#FFFFCC" CssClass="headerList"
BackColor="#990000"></HeaderStyle>
<FooterStyle HorizontalAlign="Right" ForeColor="#330099"
CssClass="BodyText" BackColor="#FFFFCC"></FooterStyle>
<Columns>
<asp:BoundColumn DataField="doccatalogid"
SortExpression="tblIntra_DocCatalog.doccatalogid"
HeaderText="ID"></asp:BoundColumn>
<asp:BoundColumn DataField="doccatalogname"
SortExpression="tblIntra_DocCatalog.doccatalogname" HeaderText="Catalog
Name"></asp:BoundColumn>
<asp:BoundColumn DataField="parentname" SortExpression="parentname"
HeaderText="Parent"></asp:BoundColumn>
<asp:EditCommandColumn EditText="Edit" HeaderText="Action"
ItemStyle-Width="40px"></asp:EditCommandColumn>
</Columns>
<PagerStyle HorizontalAlign="Right" PageButtonCount="5"
ForeColor="#330099" BackColor="#FFFFCC"
CssClass="bodytext" Mode="NumericPages"></PagerStyle>
</aspataGrid>
And the SQL statement for it is:
SELECT doccatalogid, doccatalogname, parentName, isHardcoded
FROM tblCatalog
Now, how do I have the Edit column visible ONLY if isHardcoded field = 0 ?
Thanks in advance.
- DC
<aspataGrid id="dgList" runat="server" Width="100%" CssClass="BodyText"
AllowPaging="True" AllowSorting="True"
AutoGenerateColumns="False" PageSize="20" BorderColor="#CC9966"
BorderStyle="None" BorderWidth="1px"
BackColor="White" CellPadding="4" HorizontalAlign="Right">
<SelectedItemStyle Font-Bold="True" ForeColor="#663399"
BackColor="#FFCC66"></SelectedItemStyle>
<ItemStyle ForeColor="#330099" BackColor="White"></ItemStyle>
<HeaderStyle Font-Bold="True" ForeColor="#FFFFCC" CssClass="headerList"
BackColor="#990000"></HeaderStyle>
<FooterStyle HorizontalAlign="Right" ForeColor="#330099"
CssClass="BodyText" BackColor="#FFFFCC"></FooterStyle>
<Columns>
<asp:BoundColumn DataField="doccatalogid"
SortExpression="tblIntra_DocCatalog.doccatalogid"
HeaderText="ID"></asp:BoundColumn>
<asp:BoundColumn DataField="doccatalogname"
SortExpression="tblIntra_DocCatalog.doccatalogname" HeaderText="Catalog
Name"></asp:BoundColumn>
<asp:BoundColumn DataField="parentname" SortExpression="parentname"
HeaderText="Parent"></asp:BoundColumn>
<asp:EditCommandColumn EditText="Edit" HeaderText="Action"
ItemStyle-Width="40px"></asp:EditCommandColumn>
</Columns>
<PagerStyle HorizontalAlign="Right" PageButtonCount="5"
ForeColor="#330099" BackColor="#FFFFCC"
CssClass="bodytext" Mode="NumericPages"></PagerStyle>
</aspataGrid>
And the SQL statement for it is:
SELECT doccatalogid, doccatalogname, parentName, isHardcoded
FROM tblCatalog
Now, how do I have the Edit column visible ONLY if isHardcoded field = 0 ?
Thanks in advance.
- DC