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

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

问题描述

我使用的是kendo调度程序。
调度程序网格中添加了一些事件。

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个显示周内的预定活动。
我想要的是,用蓝色圈出的那个不应该有删除选项,但用红色圈出的那个应该有。
换句话说,我想限制kendo调度程序中的某些事件被删除。

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按钮,以允许或限制事件的传播。
如果需要底层事件对象,可以通过将event元素的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天全站免登陆