tags:

views:

26

answers:

1
+1  Q: 

Sorting a GridView

Hi, I have a question regarding GridView windows forms control. As a datasource, I am using a DataTable object. When the grid view is sorted, the DataTable's row indices are not sorted. In this way, when accessing the DataTable using indices from GridView, I get the unexpected rows. How can this situation be handled?

+1  A: 

Without fully knowing how you need to reference it, you can put the table's row identifier in a column and set the column's Visible property to false and have access to it that way.

CAbbott