I have a requirement to maintain the selection on a grid after refreshing the data.
For example,
The grid is loaded and I selected the 3rd row and after that I need to reload the data and after reloading the records the 3rd row (or the previosly selected record) should be selected.
Already tried with ActiveRecord & ActiveDataItem however it can able to maintain the data but the grid selection is not happening. i.e it should be highlighted (so that user can able to see the record that was selected before ).
Can somebody help me on this?
Hello Milan,
This is the only approach that I can think of.
I am still looking for a solution which satisfy the MVVM pattern. I do not want to expose any View related (Record) properties in my ViewModel.
Hello,
I am just checking, if you need any further assistance on this matter.
Jeff, thank you for your proposal.
Milan, you can get the Index of the selected record using the following code :
View.ActiveRecord.Index;
where View is the XamDataGrid
If you have any other questions, feel free to ask.
I tried the view option however there is no property found which return the Index.