I have a Kendo Grid bound to a Wcf service that follows the example found in https://github.com/telerik/kendo-examples-asp-net/tree/master/grid-wcf-crud
This sample is based on a Wcf using <enableWebScript />. My service's Update receives the DTO from Kendo Datasource and updates perfectly, returning {"d":null}, exactly as does the grid-wcf-crud project's Product.cs Update service method.
Back in the browser, the in IE9, an error is experienced in kendo.web.js:
Line: 5128
Error: Unable to get value of the property 'length': object is null or undefined
it is likely happening in the code that is seeking to mark the rows as not dirty, because they are included in the next Save invocation, and are still marked with a red tic mark.
This error does not happen in Chrome. This error does not happen in IE when running the grid-wcf-crud. I cannot find any difference between my implementation and the sample. web.config is virtually the same between my app having the error compared to the grid-wcf-crud sample that does not have the error. Any ideas?
The code in kendo.web.js that is hitting the error follows, with the error on the last line where data is null in " length = data.length ":
var DataReader = Class.extend({
init: function(schema) {
var that = this, member, get, model;
schema = schema || {};
for (member in schema) {
get = schema[member];
that[member] = typeof get === STRING ? getter(get) : get;
}
if (isPlainObject(that.model)) {
that.model = model = kendo.data.Model.define(that.model);
var dataFunction = that.data,
getters = {};
if (model.fields) {
each(model.fields, function(field, value) {
if (isPlainObject(value) && value.field) {
getters[value.field] = getter(value.field);
} else {
getters[field] = getter(field);
}
});
}
that.data = function(data) {
var record,
getter,
idx,
length,
modelInstance = new that.model();
data = dataFunction(data);
if (!isEmptyObject(getters)) {
for (idx = 0, length = data.length; ...........
This sample is based on a Wcf using <enableWebScript />. My service's Update receives the DTO from Kendo Datasource and updates perfectly, returning {"d":null}, exactly as does the grid-wcf-crud project's Product.cs Update service method.
Back in the browser, the in IE9, an error is experienced in kendo.web.js:
Line: 5128
Error: Unable to get value of the property 'length': object is null or undefined
it is likely happening in the code that is seeking to mark the rows as not dirty, because they are included in the next Save invocation, and are still marked with a red tic mark.
This error does not happen in Chrome. This error does not happen in IE when running the grid-wcf-crud. I cannot find any difference between my implementation and the sample. web.config is virtually the same between my app having the error compared to the grid-wcf-crud sample that does not have the error. Any ideas?
The code in kendo.web.js that is hitting the error follows, with the error on the last line where data is null in " length = data.length ":
var DataReader = Class.extend({
init: function(schema) {
var that = this, member, get, model;
schema = schema || {};
for (member in schema) {
get = schema[member];
that[member] = typeof get === STRING ? getter(get) : get;
}
if (isPlainObject(that.model)) {
that.model = model = kendo.data.Model.define(that.model);
var dataFunction = that.data,
getters = {};
if (model.fields) {
each(model.fields, function(field, value) {
if (isPlainObject(value) && value.field) {
getters[value.field] = getter(value.field);
} else {
getters[field] = getter(field);
}
});
}
that.data = function(data) {
var record,
getter,
idx,
length,
modelInstance = new that.model();
data = dataFunction(data);
if (!isEmptyObject(getters)) {
for (idx = 0, length = data.length; ...........