zimmer9
asked on
How to make a Gridview column hidden (visibility false) in the HTML code?
I am developing an ASP.Net application using VS2015 and .Net Framework 4.6.1
In the following code, how would you make the field Invisible in the gridview:
<asp:TemplateField HeaderText="UndeliverID" ItemStyle-HorizontalAlign= "Left">
<EditItemTemplate>
<asp:TextBox ID="txtundeliverID" MaxLength="10" runat="server" Text='<%# Eval("undeliverID") %>'></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="lblundeliverID" runat="server" Text='<%# Eval("undeliverID") %>'></asp:Label>
</ItemTemplate>
<FooterTemplate>
<asp:TextBox ID="ftxtundeliverID" Width="50px" MaxLength="4" MaximumValue="9999" MinimumValue="1" runat="Server" Text='<%# Eval("dtCreated") %>'></asp:TextBox>
</FooterTemplate>
</asp:TemplateField>
In the following code, how would you make the field Invisible in the gridview:
<asp:TemplateField HeaderText="UndeliverID" ItemStyle-HorizontalAlign=
<EditItemTemplate>
<asp:TextBox ID="txtundeliverID" MaxLength="10" runat="server" Text='<%# Eval("undeliverID") %>'></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="lblundeliverID" runat="server" Text='<%# Eval("undeliverID") %>'></asp:Label>
</ItemTemplate>
<FooterTemplate>
<asp:TextBox ID="ftxtundeliverID" Width="50px" MaxLength="4" MaximumValue="9999" MinimumValue="1" runat="Server" Text='<%# Eval("dtCreated") %>'></asp:TextBox>
</FooterTemplate>
</asp:TemplateField>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Edited my last comment.