Hello, I've run into this before, but I was using a formsview and just changed the field to hidden. If you've seen my previous post I am trying to get the value of a cell out of a gridview to a variable and here is the code: Protected Sub GridView1_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) Handles GridView1.SelectedIndexChanged
Dim varClientID As String = GridView1.Rows(GridView1.SelectedIndex).Cells(6).Text.ToString()
End Sub This works perfectly if column 6 is visible, but because it's an id number (which is not the primary key) I do not want it visible, but changing it to visible="false" causes this code to return null. Changing it back to visible and it works.I'm not sure why the visiblity of a control changes the functionality of it.Are there any other ways to get this data out?
View Complete Post