Kendo UI过滤菜单关闭事件?

thi*_*its 5 kendo-ui kendo-grid

Hello使用类似于此示例的复选框实现了自定义筛选器菜单:

http://dojo.telerik.com/@SiliconSoul/oBoCu

我的问题是,如果用户选择/取消选择一些复选框,但从不点击"过滤"按钮.我基本上想将他们的选择重置为菜单关闭之前他们最初的选择但不认为过滤器菜单有这样的事件.

如何绑定菜单关闭?

thi*_*its 6

看起来过滤器菜单是一个kendoPopup,它有一个close事件.

$(#my-popup).data("kendoPopup").bind("close", function (e) {
  console.log("filter menu closed");
});
Run Code Online (Sandbox Code Playgroud)

由于我使用了kendoGrid的filterMenuInit事件,您可以通过Event.Container访问过滤器菜单容器

http://docs.telerik.com/kendo-ui/api/javascript/ui/grid#events-filterMenuInit

event.container.data("kendoPopup").bind("close", function (e) {
  console.log("filter menu closed");
});
Run Code Online (Sandbox Code Playgroud)