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

wrong event being edited

3 Answers 50 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
cp
Top achievements
Rank 1
cp asked on 21 Aug 2015, 04:50 PM

Hello,

could someone help me figure out where am I going wrong: http://dojo.telerik.com/eKEye

 Double clicking an event for the first time brings up the correct event, however upon closing the window and reopening it for a second time it brings up a completely different event. For instance double clicking any event on August 12th will bring up that event, but if one closes the window and reopens it the editor has a different event.

 I am fairly certain the problem is with the snippet below, any thoughts on what I am missing? Thanks!

$scope.sched.setDataSource(new kendo.data.SchedulerDataSource({
                    data: items
}));

3 Answers, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 25 Aug 2015, 01:25 PM
Hello cp,

The widget behaves incorrectly, because you are re-setting the entire data source and thus the schema options are lost. From here, the widget does not know which is the correct ID and the edited event is shifted incorrectly. What I would suggest you is to use custom transport.read function and load the source when needed. This is required, because the data will not be matched to the schema.model.fields when data is set directly. Check the following demo which shows how to accomplish your goal:
Regards,
Georgi Krustev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Philippe
Top achievements
Rank 1
answered on 27 Aug 2015, 02:34 PM

thank you, 

transport.read method works fine in Meteor (same issue as cp)

0
Philippe
Top achievements
Rank 1
answered on 27 Aug 2015, 03:25 PM

Do not forget transport.update (same method)  if you use resize/move actions, otherwise  "Uncaught TypeError: Cannot read property 'call' of undefined" is thrown in console. 

Tags
Scheduler
Asked by
cp
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Philippe
Top achievements
Rank 1
Share this question
or