R
Rushabh Dadbhawala
Problem:
I am fetching data from the database, storing it in a
dataSet, and binding it with a Data Grid. The DataGrid
controls allows sorting. The problem is that when the data
is sorted on one of the columns in the Data Grid, and I
then try to retrieve the selected row using
the "SelectedRowIndex", I get the row as per the original
order of data.
Eg: If the order of rows is: C - A - B, which after
sorting becomes A - B - C. Now, if I select the 3rd row,
and try to fetch all the cells for this row, I get the
row "B", and not the row "C".
For the time being, I have disabled sorting from the Data
Grid, and am retrieving data in the sorted order of the
key. But sorting has to be available in the control.
Any ideas ??
Thanks,
RD.
I am fetching data from the database, storing it in a
dataSet, and binding it with a Data Grid. The DataGrid
controls allows sorting. The problem is that when the data
is sorted on one of the columns in the Data Grid, and I
then try to retrieve the selected row using
the "SelectedRowIndex", I get the row as per the original
order of data.
Eg: If the order of rows is: C - A - B, which after
sorting becomes A - B - C. Now, if I select the 3rd row,
and try to fetch all the cells for this row, I get the
row "B", and not the row "C".
For the time being, I have disabled sorting from the Data
Grid, and am retrieving data in the sorted order of the
key. But sorting has to be available in the control.
Any ideas ??
Thanks,
RD.