Hi,
I'm using the approach (http://www.infragistics.com/community/blogs/petar_monov/archive/2013/02/18/xamdatagrid-selecteditems-for-mvvm.aspx) from Petar Monov to bind the SelectedItems from the XamDataGrid to my ViewModel.
The issue that I found happens if I select Data from my ViewModel and then use the "Shift"+"selection via mouse click" on a not selected record from the XamDataGrid. Using "Shift"+"selection via mouse click" I expect that I get a range of selected records, instead I observe that the clicked Record is the only selected record. This issue can be observed in the example from the blog.
Which property of the XamDataGrid do I have to set to make this kind of selection work?
Kind regards,
Darius
Hi Darius,
Attached you can find a solution using behaviors.
Thanks,
George
Hi George,
I have made some small changes to your solution in the way that I can select the Data from the View Model. Now I can observe the same issue as in the other approach. Any idea how to solve the problem?
Could you try to replace the following line in method TransferTargetToSource:
source.SelectedItems.Records.Add(record);
with
(record as DataRecord).IsSelected = true;
that is the solution for my problem.
Thank you,