Hi,
I'm using the approach (http://es.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
I have similar problem, but my viewmodel is attached to view later, using viewmodellocator. That cause a proble, SeletedItems property is null in OnAttached. I couldn't find way to bind SelectedItems correctly to SelectedSampleData. Could you please help me to resolve the issue.
Thanks
Hi George,
that is the solution for my problem.
Thank you,
Hi Darius,
Could you try to replace the following line in method TransferTargetToSource:
source.SelectedItems.Records.Add(record);
with
(record as DataRecord).IsSelected = true;
Thanks,
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?
Attached you can find a solution using behaviors.