Donate

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
.hiddenColumn{
 display:none;
}
ASPX
<asp:BoundField DataField="GroupCode" HeaderText="Group Code" ItemStyle-CssClass="hiddenColumn" HeaderStyle-CssClass="hiddenColumn"/>

Comments

Donate

Popular Posts From This Blog

WPF CRUD Application Using DataGrid, MVVM Pattern, Entity Framework, And C#.NET

TypeScript Error Or Bug: The term 'tsc' is not recognized as the name of a cmdlet, function, script file, or operable program.

Invalid nested tag div found, expected closing tag input