[Solved] Prevent Kendo Scheduler events from inconsistent removal

2 Answers 186 Views
Telerik Trainer
Xamaa
Top achievements
Rank 1
Xamaa asked on 01 May 2022, 09:31 AM | edited on 11 May 2026, 11:16 AM

We do have a Kendo Scheduler bound to a remote data source. 

The transport configuration of this scheduler's data source is done using remote urls (for CRUD), and this works perfectly,

On the server side, we make a lot of checks. So if some requirements are missing, Create, Update or event Destroy operations wouldn't pass and user will be shown the meaningful error.

The problem we're facing now is like the following :

For the Destroy action, what kind of response should we send back (from the server) to the scheduler component (in the browser on the client side ) to prevent removal of events in the UI.?

We've tried :

  • Sending back HTTP 500 status code
  • Putting an error field in the response and linking it to the schema.error configuration

But events are still removed from the UI, nevertheless the error event is fired. We even use this event to notify errors to end used.

Thank you.

2 Answers, 1 is accepted

Sort by
0
Neli
Telerik team
answered on 05 May 2022, 06:02 AM

Hi,

I will suggest taking a look at the link below to the other forum thread regarding the same issue:

- https://www.telerik.com/forums/prevent-kendo-scheduler-events-from-inconsistent-removal

Regards,
Neli
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

0
Anton Mironov
Telerik team
answered on 14 May 2026, 06:57 AM

Hi Xamaa,

To prevent the Kendo Scheduler from removing events in the UI when the server-side Destroy operation fails, you need to change the default behavior. By default, the Scheduler removes the event before waiting for the server response, even if you use schema.error or return HTTP 500.

To address this, set the data source's autoSync property to false. This ensures that changes are not applied to the UI automatically. Then, call dataSource.sync() only after confirming a successful server response. If the server returns an error, you can show a message and keep the event visible.

Example:

var schedulerDataSource = new kendo.data.SchedulerDataSource({
    transport: {
        destroy: {
            url: "your-destroy-url",
            type: "POST"
        }
    },
    schema: {
        error: function(e) {
            alert("Delete failed: " + e.errors);
        }
    },
    autoSync: false
});

I hope this information helps.

 

    Kind Regards,
    Anton Mironov
    Progress Telerik

    Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

    Tags
    Telerik Trainer
    Asked by
    Xamaa
    Top achievements
    Rank 1
    Answers by
    Neli
    Telerik team
    Anton Mironov
    Telerik team
    Share this question
    or