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

Adding multiple events in one go

3 Answers 245 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Paul
Top achievements
Rank 1
Paul asked on 29 Sep 2014, 10:10 AM
I have a use case where I need to create multiple separate events when the user clicks 'save' to add a new event in the editor. My server-side is returning an array of events, but the scheduler only adds the first one. Is there a way I can get it to add all of them?

My current work-around is to call dataSource.read() when I detect that multiple events have been returned, but there is a noticeable delay between the first event and the result of dataSource.read() being displayed in the scheduler.

Cheers, Paul.

3 Answers, 1 is accepted

Sort by
0
Accepted
Vladimir Iliev
Telerik team
answered on 01 Oct 2014, 06:25 AM
Hi Paul,

Basically current behavior is expected as the dataSource doesn't support out of the box to accept more records than the send with the "create" request. That why in current case I would suggest to continue reading the events after each create (or use "requestEnd" event to read only when more than one records are returned).
Also I would suggest to implement server filtering in your case - this way the records for the current view will be refreshed faster and the delay will be unnoticeable.

Regards,
Vladimir Iliev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Brandon
Top achievements
Rank 1
answered on 11 Mar 2016, 09:33 PM
Paul, did you ever come up with a solution for this? I'm attempting to do this right now.
0
Vladimir Iliev
Telerik team
answered on 15 Mar 2016, 08:37 AM
Hello Brandon,

Please note that It's possible to use the dataSource "requestEnd" event to detect when additional records are returned from the server side and use for example the new "pushCreate" method of the dataSource to insert these records in the dataSource. 

Regards,
Vladimir Iliev
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
Paul
Top achievements
Rank 1
Answers by
Vladimir Iliev
Telerik team
Brandon
Top achievements
Rank 1
Share this question
or