Cannot edit an event a 2nd time

5 posts, 1 answers
  1. A
    A avatar
    2 posts
    Member since:
    Nov 2013

    Posted 10 Nov Link to this post

    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?

     

  2. Answer
    Ivan Danchev
    Admin
    Ivan Danchev avatar
    1324 posts

    Posted 13 Nov Link to this post

    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.
  3. A
    A avatar
    2 posts
    Member since:
    Nov 2013

    Posted 14 Nov in reply to Ivan Danchev Link to this post

    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.

  4. Tyler
    Tyler avatar
    34 posts
    Member since:
    Feb 2017

    Posted 14 Nov in reply to A Link to this post

    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.

  5. Ivan Danchev
    Admin
    Ivan Danchev avatar
    1324 posts

    Posted 16 Nov Link to this post

    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.
Back to Top