Prevent scheduled task from being deleted

2 posts, 0 answers
  1. Marc
    Marc avatar
    4 posts
    Member since:
    May 2012

    Posted 30 May 2016 Link to this post


    Is it possible to prevent certain scheduled tasks from being deleted in the user interface?

  2. Ivan Danchev
    Ivan Danchev avatar
    1306 posts

    Posted 31 May 2016 Link to this post

    Hello Marc,

    The Scheduler can be configured so that the user cannot delete events. In order to do this you can call Destroy with a "false" parameter as shown below. By default it is "true" and deletion of events is enabled.
    .Editable(editable => editable.Destroy(false))

    This will have effect for all events. If you want to prevent the deletion only of specific events you can handle the Scheduler's Remove event, in which the event the user is trying to delete is accessible through the arguments, check whether the event fulfills a condition and cancel the deletion. In the following example we prevent the user from deleting an event with a specific title:
    function scheduler_remove(e) {
        if (e.event.title == "Take the dog to the vet") {

    Ivan Danchev
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top