Destruction event handling in kendo scheduler

I am using a kendo scheduler. Events are added to the scheduler grid.

When you hover over each event, a small (x) is in the upper right corner. ie kill the event for this event, which when clicked displays the warning message "Are you sure you want to delete this event?" If you click Yes, it will continue and delete this event.

So here is my requirement.

enter image description here

As you can see above, 3 scheduled events are scheduled for this week. I want the one that circled in blue should not delete the option, but the one that circled in red should. In other words, I want to limit some events in the kendo scheduler to deletion.

Scenario: Assume that any event that has a description cannot be deleted.

Link: http://demos.telerik.com/kendo-ui/scheduler/move-resize

Update I can make a server-side call to check if it matters or not, and then return any result to show any message I want, but I want to restrict it only on the client side so that the user cannot click it ( x) and it does not appear at all.

+6
source share
1 answer

There are several ways to handle this scenario. For example, you can attach a special β€œclick” event handler to the β€œX” button in an event element in which the distribution of the event is allowed or restricted. If you need a basic event object, you can get it by passing the "uid" attribute of the event element to the "implementationByUid" method of the scheduler.

Example

+1
source

Source: https://habr.com/ru/post/983857/


All Articles