471,579 Members | 1,683 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,579 software developers and data experts.

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 1124

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
reply views Thread by leo001 | last post: by
reply views Thread by lumer26 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.