I have in my gridview the following two BoundFields
<asp:BoundField DataField="ProductId" HeaderText="ID" HeaderStyle-HorizontalAlign="Left" Visible = "false" />
<asp:BoundField DataField="ProductDescription" HeaderText="product Description" HeaderStyle-HorizontalAlign="Left" />
How can I obtain the value of the first bound field if its set to visible false?
You can’t access the value of BoundField that is invisible. You have to use
TemplateFieldand add theHiddenFieldcontrol in it and bind its Value property.Markup,
Code behind to get the value from HiddenField control of 1st cell of each row.