I have two grids on different views and their selected row is kept in sync through code.
If i click on a row in grid one this shows the other grid with the proper row selected. If i then click a new row in grid two and go back to gird one my original selection is still highlighted.
before setting the new selection active/selected i have tried:
Iterating through all the records setting IsSelected and IsActive to false (didn't work)
Setting _dataGrid.SelectedItems.Records.Clear() (didn't work)
Anything else that i can try?
thanks,
Jamie
>What you can do is obtaining the Grid A’s newly selected records and store them, so in the Grid B’s >loaded event handler you can apply them after clearing the records collection (Records.Clear()).
My problem is that the old selections won't clear.
These grid are not in tabs, the are on different panels (views) within the app. I'm not able to clear the old selections. Adding the new selection works correctly.
Hello,
I have been looking into your question and I noticed that you mentioned that grids are in different views. If that means that they are in different TabItems, then this behavior is a known issue that is currently being investigated by our developers team.
If this is your scenario, then you should consider approaches that include applying your settings in the grid’s load event. What you can do is obtaining the Grid A’s newly selected records and store them, so in the Grid B’s loaded event handler you can apply them after clearing the records collection (Records.Clear()).
Please let me know if you need further assistance regarding the discussed matter.
Sincerely,
Ekaterina
Developer Support Engineer
Infragistics, Inc.
www.infragistics.com/support