I'm fetching data form a remote source using the DataSource transport.
The remote is read-only, so I only specify the read-object in the transport, like so:
The data is to be edited locally in a Kendo Grid and then posted manually to another server.
The problem is, as soon as the user finishes editing a row, the Grid tries to persist the changes. The sync()-method of the DataSource is called and crashes when the RemoteTransport object crashes as it tries to fetch for the update method, which does not exists.
The error:
The code (from the GPL-version of Kendo UI):
Is there any way of making the DataSource fetch remote data, but edit only locally?
The remote is read-only, so I only specify the read-object in the transport, like so:
transport: {
read: {
data: {
f:
'getOrderSuggestion'
}
}
}
The data is to be edited locally in a Kendo Grid and then posted manually to another server.
The problem is, as soon as the user finishes editing a row, the Grid tries to persist the changes. The sync()-method of the DataSource is called and crashes when the RemoteTransport object crashes as it tries to fetch for the update method, which does not exists.
The error:
The code (from the GPL-version of Kendo UI):
var
Remote Transport = Class.extend({
// ....
// Other stuff
// ....
setup:
function
(options, type) {
options = options || {};
var
that =
this
,
parameters,
operation = that.options[type],
// <<<----- undefined if transport.update isn't defined and update is called
data = isFunction(operation.data) ? operation.data() : operation.data;
options = extend(
true
, {}, operation, options);
parameters = extend(data, options.data);
options.data = that.parameterMap(parameters, type);
if
(isFunction(options.url)) {
options.url = options.url(parameters);
}
return
options;
}
});
Is there any way of making the DataSource fetch remote data, but edit only locally?