Pending Review
Last Updated: 26 Jul 2018 06:08 by ADMIN
Created on: 18 Dec 2015 15:32
Category: MVVM
Type: Feature Request
Add Kendo grid MVVM binding for selected items
When the Kendo Grid is bound using MVVM, add a 2-way 'value' binding which tracks the data items for selected rows.

The new binding should have the following features:
•	Support a 'value' binding on the observable model: 
<div data-role="grid" data-bind="source: someDatasource, value: selectedItems" ...>
•	Support multiple select mode using an array binding, or single select mode using a single dataItem.
•	2-way binding (update grid selection when the bound value is changed; update bound value when grid selection is changed) 
This new feature will make it easier to handle two use cases (which are both super common) when using MVVM:
•	Implement a checkbox column to control selected rows
•	Implement another MVVM component which wants to take some action based on the currently-selected grid item(s)

Here is an example of a partial solution that somebody else implemented:

The custom binding that Atanas posted only supports single-row selection mode. It is also model-dependent and (I think) uni-drectional.