This is a migrated thread and some comments may be shown as answers.

Scheduler model id generation

1 Answer 140 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Anton.S
Top achievements
Rank 1
Anton.S asked on 29 Mar 2017, 10:03 AM

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" }
            }
        }
    }},

1 Answer, 1 is accepted

Sort by
0
Nencho
Telerik team
answered on 31 Mar 2017, 07:08 AM
Hello Anton,

I have inspected the implementation that you use and noticed that there is a slight difference with our online demo. While the difference between the dataType usage of and  is regarding some cross-origin issues, could you try setting the dataType to as demonstrated in our online demo In addition, notice how we suggest the implementation for the parameterMap:

http://demos.telerik.com/kendo-ui/scheduler/index


In addition, if the problem still persists, I would like to ask you to submit a support ticket, along with a runnable sample attached, so we could locally inspect the problematic and pin down the reason for it.

Regards,
Nencho
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data (charts) and form elements.
Tags
Scheduler
Asked by
Anton.S
Top achievements
Rank 1
Answers by
Nencho
Telerik team
Share this question
or