I have a problem when I sort my gridview.
The problem is that after sorting it does not get the correct ID after i execute the below code.
Protected Sub gvCustomres_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles gvCustomres.SelectedIndexChanged
'Dim row As GridViewRow = gvCustomres.SelectedRow
'Session("BrokerID") = row.Cells(0).Text
eg, after sorting, the ID id the top row maybe 270 but when I click on the button that executes the above code then it sees the value of cell 0(id) as '1' instead of 270
How can I resolve this.