Hide ASP.NET Web Forms GridView BoundField Column With Value Accessible Through JavaScript
To hide a BoundField column but make it's value still accessible through JavaScript just set column's ItemStyle-CssClass and HeaderStyle-CssClass properties using CSS class
with value display:none.
CSS
ASPX
CSS
.hiddenColumn{ display:none; }
<asp:BoundField DataField="GroupCode" HeaderText="Group Code" ItemStyle-CssClass="hiddenColumn" HeaderStyle-CssClass="hiddenColumn"/>
Comments
Post a Comment