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

Recommeded method to add event to SchedulerDataSource

1 Answer 39 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
AceRoute Dev
Top achievements
Rank 1
AceRoute Dev asked on 15 Jan 2014, 01:00 AM
We are not using the "transport" mechanism to do CRUD calls due to other dependencies. Instead we are using add/remove API calls to manually manage Scheduler data.

To do an update of an event, can I safely  do "Add" without "Remove"? Will the new added event with same id replace existing event (of same id) or will it cause any unexpected issues?

1 Answer, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 15 Jan 2014, 07:41 AM
Hi Ajeet,

No, this approach won't work because the newly added item won't replace the existing one. To successfully update an event you need to first get it from the data source by id and then set its fields:

var e = dataSource.get(22);
e.set("start", new Date());
e.set("title", "New title");

Regards,
Atanas Korchev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Scheduler
Asked by
AceRoute Dev
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Share this question
or