Hi all!
I have a simple grid which is initially empty (I have autoBind false) and I fill it afterwards with the following:
grid.setDataSource(values);
grid.dataSource.read();
this is working fine so far, and the grid reflects the data. The issue comes when trying to do some server-side operation, like sorting or editing data. When I click on the 'Save Changes' button, or try to sort on column, nothing happens, the controller is not reached. What am I doing wrong? Here is my grid:
$(
this
.sharpID).kendoGrid({
dataSource: {
transport: {
read: {
url:
"training/Read"
,
dataType:
"jsonp"
},
update: {
url:
"training/Update"
,
dataType:
"jsonp"
},
destroy: {
url:
"/training/Destroy"
,
dataType:
"jsonp"
},
create: {
url:
"/training/Create"
,
dataType:
"jsonp"
}
},
batch:
true
,
schema: {
model: {
id:
"ITEM"
,
fields: {
"ITEM"
: { editable:
true
},
"AREA"
: { editable:
false
},
"YEAR"
: { editable:
false
},
"MONTH"
: { editable:
false
},
"DAY"
: { editable:
false
},
"QTY"
: { editable:
true
}
}
}
}
},
editable:
true
,
autoBind:
false
,
columns: structure.columns,
toolbar: [
"save"
,
"cancel"
],
sortable: {
mode:
"multiple"
},
});
Thanks in advance.