I am using a kendo scheduler. There are events added in scheduler grid.
On mouse hover of each event a small (x) comes on top right corner. i.e destroy event for that event, which when clicked shows an warning message "Are you sure you want to delete this event?" If clicked Yes it goes ahead and deletes that event.
So here is my requirement.
As you can see above there are 3 scheduled events in the shown week. I want that, the one circled in blue shouldn't have delete option but the one circled in red should have. In other words, I want to restrict some events in the kendo scheduler from deleting.
Scenario: Lets say any event having a description can't be deleted.
Link: http://demos.telerik.com/kendo-ui/scheduler/move-resize
Update I can do a server side call to check if description has value or not and then return any result to show any message that I want, but I want restriction at client side only so that an user won't be able to click that (x) link and it is not displayed at all.
There are several ways to handle this scenario. For example you can attach custom "click" event handler to the "X" button in the event element in which to either allow or restrict propagation of the event. If you need the underlying event object you can get it by passing the "uid" attribute of the event element to the "occurrenceByUid" method of the scheduler.
Example
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With