Posted 19 December 2017, 8:36 am EST
Hi,
how can I read all selected rows in MVVM-Environment?
Codebehind is easy, but I’m missing such a parameter to do it in MVVM.
Best regards,
Thomas
Forums Home / ComponentOne / WPF Edition
Posted by: topran on 19 December 2017, 8:36 am EST
Posted 19 December 2017, 8:36 am EST
Hi,
how can I read all selected rows in MVVM-Environment?
Codebehind is easy, but I’m missing such a parameter to do it in MVVM.
Best regards,
Thomas
Posted 20 December 2017, 2:44 am EST
Hi Thomas,
You may use SelectedItems to get the list of selected records. Attached is a sample application in MVVM showing all the selected records on a Button click.
Let me know if there is anything else you need.
Thanks,
Ruchir Agarwal
DataGridSample_MVVM.zip
Posted 4 January 2018, 3:45 am EST
Thanks for your example, but reading SelectedItems is Code-Behind and not MVVM.
Posted 4 January 2018, 7:45 am EST
Hi,
Sorry for our previous reply.
This is not possible directly in C1DataGrid to bind a property SelectedItems. So
I attached a sample application that created a DependancyProperty to achieve your requirement.
Hope, it will solve your issue.
Thanks,
Singh
DataGridSeletedItems.zip