Page

How to get Hidden Column Value in GridView

Try to have them Visible="true", but hide them with CSS.

METHOD 1:

<style type="text/css">
 .hidden-col
 {
     display:none;
 }
</style>


<asp:BoundField HeaderText="User ID" DataField="Id" ItemStyle-CssClass="hidden-col" HeaderStyle-CssClass="hidden-col" >

</asp:BoundField>


METHOD 2:

<asp:BoundField HeaderText="User ID" DataField="Id"  Visible="False" >

</asp:BoundField>

No comments:

Post a Comment