I'm developing a page where I'm using Sheduler to show some daily activities.
And I noticed strange behavior.
When I change an activity from one day to the next, the script should call update by passing the selected item.
But at the first time it is calling the "create" by passing an array with all the items (including what was modified). Being that of the second time on, it calls the "update" passing only the selected item (desired behavior).
Is this a normal behavior or is it possible to modify to call the update by passing only the item that has been modified at all times?
$("#scheduler").kendoScheduler({
date: kendo.date.today(),
footer: false,
selectable: true,
timezone: "Etc/UTC",
views: [
{ type: "week", selected: true }
],
dataSource: {
batch: true,
transport: {
read: function (e) {
$.ajax({
url: '/Lab/ProductionScheduling/Get_List/',
dataType: "json",
success: function (result) {
e.success(result);
},
error: function (result) {
e.error(result);
}
});
},
update: function (e) {
console.log('Update...');
console.log(e.data);
e.success();
},
destroy: function (e) {
console.log('Destroy...');
e.success();
},
create: function (e) {
console.log('Create...');
console.log(e.data);
e.success();
}
},
schema: {
model: {
id: "TaskID",
fields: {
taskId: { from: "TaskID", type: "number" },
title: { from: "Title", defaultValue: "No title", validation: { required: true } },
start: { type: "date", from: "Start" },
end: { type: "date", from: "End" },
startTimezone: { from: "StartTimezone" },
endTimezone: { from: "EndTimezone" },
description: { from: "Description" },
recurrenceId: { from: "RecurrenceID" },
recurrenceRule: { from: "RecurrenceRule" },
recurrenceException: { from: "RecurrenceException" },
ownerId: { from: "OwnerID", defaultValue: 1 },
isAllDay: { type: "boolean", from: "IsAllDay" }
}
}
}
}
});
In the attached images are the results of operations.
The first time I move a day item (create.png) and the second time I move the item (update.png).