This is a migrated thread and some comments may be shown as answers.

SelectedItemsSource?

1 Answer 97 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Anthony
Top achievements
Rank 1
Anthony asked on 25 Feb 2019, 11:34 PM

Does the RadGridView have something similar to the SelectedItemsSource that the RadListbox has? I'd like to automatically bind the selected items to a collection in my view-model like I do with the list box.

example:

<telerik:RadGridView
     ItemsSource="{Binding ..., Mode=OneWay}"
     telerik:ListBoxSelectedItemsBehavior.SelectedItemsSource="{Binding ..., Mode=OneWay}">

1 Answer, 1 is accepted

Sort by
0
Dinko
Telerik team
answered on 28 Feb 2019, 01:10 PM
Hi Anthony,

RadGridView controls do not support binding its selected items collection. What you could try is to create some attached behavior that syncs a collection to the SelectedItems of RadGridView. You can find a very good implementation of such behavior achieve via an attached property in the BingindSelectedItemsFromViewModel SDK example. The example is located in our GitHub repository. 

Hope this example will work for your scenario.

Regards,
Dinko
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
GridView
Asked by
Anthony
Top achievements
Rank 1
Answers by
Dinko
Telerik team
Share this question
or