469,270 Members | 1,168 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,270 developers. It's quick & easy.

DataView, DataGrid sorting and incorrect SelectedIndex

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.

Jul 18 '06 #1
0 1086

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by John Smith | last post: by
2 posts views Thread by Simon | last post: by
1 post views Thread by Jeremy | last post: by
2 posts views Thread by ddaniel | last post: by
8 posts views Thread by Dennis | last post: by
5 posts views Thread by enceladus311 | last post: by
reply views Thread by Nathan Franklin | last post: by
2 posts views Thread by Kuldeep | last post: by
1 post views Thread by richard | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.