knockout.js - How can I bind selectedItems in kendoGrid? -


i'm using rniemeyer's kncokout-kendo.js http://rniemeyer.github.io/knockout-kendo/web/grid.html

i've 'people' , need selected person.

<div id="grid" style="width:450px" data-bind="kendogrid: {height:400,columns:['id','name'],navigatable:true,selectable:true,rowtemplate: 'rowtmpl', usekotemplates: true,data: people, select: selectedperson,value:selectedperson }" ></div> 

neither 'select' nor 'value' works.

people observablearray

the example not work both selectedperson observable, selectedperson observablearray.

i'm not familiar kendo, judging this existing fiddle think need use change option part of grid configuration:

kendogrid: { change: function (event) {                          self.selecteddata(this.dataitem(this.select()[0]));                      } } 

see this fiddle contains code question (with few options commented out because no view code posted in question).


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -