I think I found the problem. The configuration of a SchedulerDataSource is a little counterintuitive.
My database stores the event identifier as id , but taskId is required for the taskId , so this field is defined as:
taskId: { from: 'id', type: 'number' }
but I did not understand that you also needed to define the id model as taskId , and not what was actually returned by the server.
So, the full SchedulerDataSource schema looks like this:
schema: { data: 'data', total: 'total', model: { id: 'taskId', fields: { taskId: { from: 'id', type: 'number' }, title: { from: 'title', defaultValue: 'No title', validation: { required: true } }, start: { type: 'date', from: 'start' }, end: { type: 'date', from: 'end' }, description: { from: 'description' }, ownerId: { from: 'employee_id' }, isAllDay: { type: 'boolean', from: "allDay" }, type_id: { type: 'number' } } } }
Just out of interest, does anyone know that you can define field aliases using from: 'server-field' in a regular Kendo data source? May be helpful.
source share