B
brian_is_online
Hi all,
I have a DataGrid which is bound to a DataView to return search
results. The DataGrid headers allow sorting so when clicked I rebind
the DataView with the appropriate Sort property. To save expensive
database calls, the DataView is used instead of re-querying.
I've now got a problem where if I select a row in the DataGrid, then
sort the column, the position maintained is the same, but the wrong row
is now selected due to the search. Does anyone have any idea how I can
persist the correct SelectedIndex property of the DataGrid. Note that
the data I'm binding does not have a unique key.
Thanks in advance.
B.
I have a DataGrid which is bound to a DataView to return search
results. The DataGrid headers allow sorting so when clicked I rebind
the DataView with the appropriate Sort property. To save expensive
database calls, the DataView is used instead of re-querying.
I've now got a problem where if I select a row in the DataGrid, then
sort the column, the position maintained is the same, but the wrong row
is now selected due to the search. Does anyone have any idea how I can
persist the correct SelectedIndex property of the DataGrid. Note that
the data I'm binding does not have a unique key.
Thanks in advance.
B.