I've got a Kendo UI scheduler which binded to remote data source.
I create first event and see a HTTP POST request to the server with JSON data and Id = 0 in it, then I create the second one I also see HTTP POST request but Id still = 0. Any attempt to edit any of those events trigger CREATE url call again so it's actualy not working at all.
Here is scheduler data source configuration.
dataSource: {
// configuration for kendo.data.SchedulerDataSource
transport: {
read: {
url:
"/api/scheduler/events"
,
dataType:
"json"
},
create: {
url:
"/api/scheduler/event"
,
dataType:
"json"
},
update: {
url:
"/api/scheduler/event-update"
,
dataType:
"json"
},
destroy: {
url:
"/api/scheduler/delete"
,
dataType:
"json"
},
parameterMap:
function
(data, type) {
console.log(type);
return
kendo.stringify(data);
}
},
schema: {
model: {
id:
"taskId"
,
fields: {
taskId: { from:
"Id"
, type:
"number"
},
title: { from:
"Title"
, defaultValue:
"Empy"
, 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"
},
eventTypeId: { from:
"EventType"
, type:
"number"
}
}
}
}
},