在剑道调度程序中处理销毁事件 [英] Handle destroy event in kendo scheduler

查看:26
本文介绍了在剑道调度程序中处理销毁事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用剑道调度程序.调度程序网格中添加了事件.

I am using a kendo scheduler. There are events added in scheduler grid.

鼠标悬停在每个事件上时,右上角会出现一个小 (x).即该事件的销毁事件,单击该事件时会显示警告消息您确定要删除此事件吗?"如果点击是,它会继续并删除该事件.

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.

这是我的要求.

如上所示,显示的一周内有 3 个预定的事件.我想要那个,用蓝色圈起来的那个不应该有删除选项,但用红色圈起来的那个应该有.换句话说,我想限制剑道调度器中的一些事件被删除.

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.

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

更新我可以做一个服务器端调用来检查描述是否有值,然后返回任何结果以显示我想要的任何消息,但我只想在客户端进行限制,这样用户将无法点击 (x) 链接,它根本不显示.

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.

推荐答案

有几种方法可以处理这种情况.例如,您可以将自定义单击"事件处理程序附加到事件元素中的X"按钮,以允许或限制事件的传播.如果您需要底层事件对象,您可以通过将事件元素的uid"属性传递给调度程序的occurrenceByUid"方法来获取它.

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.

示例

这篇关于在剑道调度程序中处理销毁事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆