Hi after i sort my gridview, when i want to edit a row the selected row is completely wrong.
what can i do?
Hi after i sort my gridview, when i want to edit a row the selected row is completely wrong.
what can i do?
After sorting, try setting the SelectedIndex property to -1.
Alternatively, try using the SelectedDataKey property (check this link for details). Note that you may have to write your code in the PreRender event for the data keys to be set.