Hello everyone,
I copied the demo grid source for the remote data, and when I click the add button and the popup form is filled out everything looks good. If I click on the edit button or delete button the datasource is still calling the server with the create part of the transport and ignoring the update/destory. How can I get this working?
dataSource = new kendo.data.DataSource({
transport: {
read: {
url: crudServiceBaseUrl,
dataType: "jsonp"
},
update: {
url: crudServiceBaseUrl + "?action=update",
dataType: "jsonp",
type: "POST"
},
destroy: {
url: crudServiceBaseUrl + "?action=destroy",
dataType: "jsonp"
},
create: {
url: crudServiceBaseUrl + "?action=create",
dataType: "jsonp",
type: "POST"
},
parameterMap: function(options, operation) {
if (operation !== "read" && options.models) {
return {models: kendo.stringify(options.models)};
}
}
},
etc....
});
$("#grid").kendoGrid({
dataSource: dataSource,
pageable: true
etc....
});
I copied the demo grid source for the remote data, and when I click the add button and the popup form is filled out everything looks good. If I click on the edit button or delete button the datasource is still calling the server with the create part of the transport and ignoring the update/destory. How can I get this working?
dataSource = new kendo.data.DataSource({
transport: {
read: {
url: crudServiceBaseUrl,
dataType: "jsonp"
},
update: {
url: crudServiceBaseUrl + "?action=update",
dataType: "jsonp",
type: "POST"
},
destroy: {
url: crudServiceBaseUrl + "?action=destroy",
dataType: "jsonp"
},
create: {
url: crudServiceBaseUrl + "?action=create",
dataType: "jsonp",
type: "POST"
},
parameterMap: function(options, operation) {
if (operation !== "read" && options.models) {
return {models: kendo.stringify(options.models)};
}
}
},
etc....
});
$("#grid").kendoGrid({
dataSource: dataSource,
pageable: true
etc....
});