Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1320
Select next row in datagrid
posted

Hi,

I am binding a list to a xamdatagrid through mvvm. This list is ordered through the xaml properties of the grid so the ordering in the grid shown is not equal to the ordering of my list used in the viewModel. The results list is filled from a call to a service. Now on certain actions a row is removed from the list and we call the service again to get an refresh list. The problem is we would like to select the next row in the grid (if it is still in the list after the refresh) but we have no way of finding out what the next element in the datagrid is as our list in the viewmodel doesn't have the same order. Is there I way I can get the data of the next item in the datagrid?

I have made a small simplified example that I attached to this post.

Thanks!

DataGridPoc.zip