Before my implementation I reproduced your video example about datasource but my example I use local data (http://www.youtube.com/watch?feature=player_embedded&v=FhHMOjN0Bjc)
I need show the id of "DataSource" when select the kendoGrid although the kendoGrid dont show the id in column
I need show the id of "DataSource" when select the kendoGrid although the kendoGrid dont show the id in column
var mydata = [{id:"1",age:"23",name:"hernan"}]; var myschema = kendo.data.Model.define({ id : "id", name: "name", age: "age" });var ds = new kendo.data.DataSource({ data: mydata, schema : { model : myschema } }); //and in the grid I configured it:var personId;
$("#grid-distributors").kendoGrid({ dataSource: ds, selectable: true, height: 360, scrollable: true, sortable: true, pageable: true, change : function() { var id = this.select().data("id"); personId = this.dataSource.get(id); alert(personId); //DONT SHOW ME THE ID!! :( }, columns: [ { field: "name", title: "Nombre" }, { field: "age", title: "Edad" } ] });