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

Cannot edit an event a 2nd time

4 Answers 119 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
A
Top achievements
Rank 1
A asked on 10 Nov 2017, 02:30 PM

I have been having a problem with trying to edit a second time after pressing cancel the first time. I found a kendo example which demonstrates my problem: https://docs.telerik.com/kendo-ui/controls/scheduling/scheduler/how-to/binding/using-local-observable-data-object

I clicked cancel when editing an event. Then double clicked the event again to edit and it did not work. In the example it will only redisplay the edit screen if you press the "update" button first. But after that you can open the edit screen and press cancel as many times as you like.

Can you help fix this?

 

4 Answers, 1 is accepted

Sort by
0
Accepted
Ivan Danchev
Telerik team
answered on 13 Nov 2017, 06:26 PM
Hello,

The described behavior is expected when the Scheduler's DataSource transport configuration is not configured, as mentioned in this thread in which the removal of edited events after pressing cancel is discussed. As you can see from Georgi's explanation in his post, unless the events are synced they are considered temporary and are removed.
So the options are: to configure the dataSource, see for example one of our demos, or to set unique id's to the created events (see this dojo example).

Regards,
Ivan Danchev
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
A
Top achievements
Rank 1
answered on 14 Nov 2017, 10:40 AM

I am using a local datasource so I don't use transport do I? Under the transport section it says "Local data sources are bound to a JavaScript array via the data option.".

I believe I have done this in my Scheduler code. Could you provide me with a dojo example of Scheduler using a local datasource that is edited multiple times? The original link (https://docs.telerik.com/kendo-ui/controls/scheduling/scheduler/how-to/binding/using-local-observable-data-object) I mentioned is Scheduler using a local datasource. But does not work unless the 1st time round you click the "update" button even though I pressed cancel.

Thank you.

0
Tyler
Top achievements
Rank 1
answered on 14 Nov 2017, 05:04 PM

Here is a link to documentation on handling CRUD operations in your scheduler. You will set up a transport, and pass the created/updated/destroyed event to e.success in each CRUD operation (except read, where you pass the entire array of scheduler events to e.success()). 

 

I believe your current binding to local array of data is fine for viewing events... but when you want to edit/create/delete/etc... you should define a transport in your dataSource.

0
Ivan Danchev
Telerik team
answered on 16 Nov 2017, 09:58 AM
Hello,

The article Tyler linked demonstrates how to set up both local and remote CRUD operations. The Scheduler in the last example I linked in my previous reply has dataSource transport configured and uses local data. Here's the same dojo with a small modification: the data comes from an array and is passed to the Scheduler in the dataSource.transport.read function.

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