I’ve got a problem with updating kendo ui grid.
I create grid like this one:
http://demos.kendoui.com/web/grid/editing-custom.html,
but also I’ve add update ability.
My problem is in next.
After updating grid, update request goes good (POST url 200 OK), but after it I get an error in browsers console:
TypeError: Distribution is undefined.
Distribution is type of data in drop down list.
Here is my code:
dataSource:
...
update: {
url: "/Modeling/EditCurrentStates",
type: "POST"
}
...
schema: {
model: {
id: "StateNumber",
fields: {
...
Distribution: { defaultValue: { Id: 1, Name: "Exponential"}
...
columns: [
...
{
field: "Distribution",
title: "Distribution",
editor: distributionDropDownEditor,
template: "#=Distribution.Name#"
},
function distributionDropDownEditor(container, options) {
$('<input data-text-field="Name" data-value-field="Id" data-bind="value:' + options.field + '"/>')
.appendTo(container)
.kendoDropDownList({
autoBind: false,
dataSource: {
type: "json",
transport: {
read: "/Modeling/GetDistributions"
}
}
});
}
You do not define where your datas are coming from to kendo. You need to exe
data: “data”