Hi,
I have a gridview where i have a BoundField where I set the visible to false as they hold data that is not required for the user to see.
The gridview is populated by a DataSchema (.xsd file)
I am trying to retrieve the invisible value from the gridview when the user after a user selects a row but all i get back is nothing. If i remove the visible tag everything works fine.
<asp:GridView ID="grvCustDetails" runat="server" AutoGenerateColumns="false" OnSelectedIndexChanged="grvCustDetails_SelectedIndexChanged" AutoGenerateSelectButton="true">
<Columns >
<asp:BoundField DataField="custid" HeaderText="Customer ID"/>
<asp:BoundField DataField="custname" HeaderText="Customer Name"/>
<asp:BoundField DataField="custadd" HeaderText="Customer Address" />
<asp:BoundField DataField="custcontdet" HeaderText="Customer Contact Details" />
<asp:BoundField DataField="custvatcode" HeaderText="Customer VAT Code" />
<asp:BoundField DataField="ppsno" HeaderText="Sales Person ID" />
<asp:BoundField DataField="cusDelete" HeaderText="Deleted" Visible="false" />
</Columns>
</asp:GridView>
Protected Sub grvCustDetails_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles grvCustDetails.SelectedIndexChanged
Dim row As GridViewRow = grvCustDetails.SelectedRow
Dim strCustDelete As String = row.Cells(7).Text
End Sub
Thanks for your help