GridView sorting problem?
after i sort my gridview, when i want to edit a row the selected row i开发者_开发百科s 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.
精彩评论