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

radgridview SelectedItems two way binding

1 Answer 668 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Gopinath
Top achievements
Rank 2
Gopinath asked on 12 Dec 2012, 10:33 AM
Hi,

I am using the GridViewSelectColumn inside my grid-view. With the help of behavior i am able to get the  selected items list in MVVM pattern.But i am not able to load back the selected items to the Grid-view.

Ex: I am having child window which contains the grid-view, The grid-view contains the GridViewSelectColumn . With the help of behavior i am able to get the  selected items list in MVVM pattern.

I am passing that list to parent window.

When this child-window again opens from Parent Window, i need the grid-view should contain the selected list back in that. I am passing the list(which was sent from child to parent) from parent to child . But the grid items are not in selected mode.

Can anyone suggest the way please.

Thanks
Gopinath

1 Answer, 1 is accepted

Sort by
0
Ivan Ivanov
Telerik team
answered on 12 Dec 2012, 11:54 AM
Hello,

As SelectedItems does not have a public setter, which is a common convention for collection-type properties, you cannot just bind it with a two-way binding. Here is a blog article that illustrates a MVVM-friendly behavior to synchronize your selected items with the ViewModel.

Regards,
Ivan Ivanov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
GridView
Asked by
Gopinath
Top achievements
Rank 2
Answers by
Ivan Ivanov
Telerik team
Share this question
or