I have a custom create and a custom destroy method in use. The create simply return a custom object that mirrors the schema of the grid with preset values. The destroy does two things, first it deletes the entry via rest and then it removes the row.
When I reload I can create a new entry and everything. When I delete an entry and try to add a new one i get the following error:
Uncaught TypeError: Cannot read property 'call' of undefined kendo.all.js:7386
(anonymous function) kendo.all.js:7386
b.extend.Deferred jquery_1.9.1.min.js:4
Observable.extend._promise kendo.all.js:7382
Observable.extend._send kendo.all.js:7416
Observable.extend.sync kendo.all.js:7208
Observable.extend._change kendo.all.js:7609
b.extend.proxy.b.isFunction.i jquery_1.9.1.min.js:4
Class.extend.trigger kendo.all.js:179
Observable.extend.splice kendo.all.js:5021
Observable.extend.insert kendo.all.js:7043
Widget.extend.addRow kendo.all.js:36077
(anonymous function) kendo.all.js:36138
b.event.dispatch jquery_1.9.1.min.js:4
b.event.add.v.handle
The create function is similar to the following
create: function (options) {
var createNewRow = {
unit: { Name: ""},
number: {},
Id: { Name: ""},
Quantity: 1
};
options.success(createNewRow);
// options.success(options);
}
And the delete pretty much looks like this
function deleteProduct(e){
var grid = $("#grid").data("kendoGrid"),
currentRow = $(e.currentTarget).closest("tr"),
currentRowData = this.dataItem(currentRow);
grid.removeRow(currentRow[0]);
grid.dataSource.read();
grid.refresh();
}
I had to remove some CRM dependant parts
When I reload I can create a new entry and everything. When I delete an entry and try to add a new one i get the following error:
Uncaught TypeError: Cannot read property 'call' of undefined kendo.all.js:7386
(anonymous function) kendo.all.js:7386
b.extend.Deferred jquery_1.9.1.min.js:4
Observable.extend._promise kendo.all.js:7382
Observable.extend._send kendo.all.js:7416
Observable.extend.sync kendo.all.js:7208
Observable.extend._change kendo.all.js:7609
b.extend.proxy.b.isFunction.i jquery_1.9.1.min.js:4
Class.extend.trigger kendo.all.js:179
Observable.extend.splice kendo.all.js:5021
Observable.extend.insert kendo.all.js:7043
Widget.extend.addRow kendo.all.js:36077
(anonymous function) kendo.all.js:36138
b.event.dispatch jquery_1.9.1.min.js:4
b.event.add.v.handle
The create function is similar to the following
create: function (options) {
var createNewRow = {
unit: { Name: ""},
number: {},
Id: { Name: ""},
Quantity: 1
};
options.success(createNewRow);
// options.success(options);
}
And the delete pretty much looks like this
function deleteProduct(e){
var grid = $("#grid").data("kendoGrid"),
currentRow = $(e.currentTarget).closest("tr"),
currentRowData = this.dataItem(currentRow);
grid.removeRow(currentRow[0]);
grid.dataSource.read();
grid.refresh();
}
I had to remove some CRM dependant parts