Hello,
I have a xamdatagrid that binds to a property. Once this property is updated the grid is refreshing, however it is loosing the filters and the selected item.
I don't have any code written for this issue. I need your help with keeping the filters and select the same record that was originally selected.
Please note I'm using MVVM pattern.
Thank you
I have created a simple sample application based on your scenario in order to test this behavior. Basically I have used XamDataGrid and in the Click handler of a Button I am adding new items to the property of my ViewModel. I could not managed to reproduce such issue on my side. Would you please modify the attached project with the functionality, that you are using, so it reproduces the issue. This way I would be able to further investigate this for you and provide you with more detailed information on this matter.
Looking forward to hearing from you.
Sincerely, ZhivkoEntry Level Software Developer
Hello Zhivko,
I was able to solve the refresh issue. However,I'm facing the following scenario.
I have the xamdatagrid, when I double click on a record another form opens up. When I close the latter, the selected record on the xamdata grid becomes un selected and I loose track of the last record I selected.
Is there a setting to solve this issue ?
I have tried to bind SelectedDataItem to a property in the view model that keeps track of the last selected item. It didn't work at least for me.
I have modified the attached sample application in order to test the selection issue after double click on a record and it seems that I am missing something from your scenario. I could not managed to reproduce this behavior on my side. Would you please modify the attached project with the functionality, that you are using, so it reproduces the issue. This way I would be able to further investigate this for you.
Hi Zhivko,
Sorry for the late reply. I figured out the issue. Thank you for you help.
I am really glad, I could help out. If you do not have any further questions, please verify this thread as answered, so it helps other users as well.