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
Thanks Elena, that did the trick.
Hello jamcquay,
Thank you for modifying the sample. I have been looking into this and I can suggest you clear the Selected cells collection along with the selected rows as follows:
xamDataGrid1.SelectedItems.Records.Clear();
xamDataGrid1.SelectedItems.Cells.Clear();
xamDataGrid1.SelectedItems.Fields.Clear();
This way every time you change the view you will clear the all of the selected items on your XamDataGrid.
If you have any additional questions on this matter or if I have misunderstand you in any way please feel free to ask.
Hi Ekaterina,
I can reproduce my problem in the sample that you made. I've updated your project to the infragistics dlls i'm using and I also set the SelectionTypeRecord to Extended for the grids
to reproduce
1. Shift-click 2-3 records in the first grid
2. Click the button
3. The first of the selected is highlighted in the second (good)
4. Click another row in the second grid
5. Click the button
6. The original rows are still highlighted in the first grid
Hello,
I am just checking your progress on the issue.
If you require any further assistance please do not hesitate to ask.
Sincerely,
Ekaterina
Developer Support Engineer
Infragistics
www.infragistics.com/support
Thank you for your answer.
I have created a sample project that illustrates the SelectedItems.Records.Clear() method’s functionality.
Would you please take a look at this sample and compare with the usage scenario in your application.
Please let me know if I can assist you further.
Infragistics, Inc.