Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Kendo UI filter menu close event?

Hello implemented a custom filter menu using checkboxes similar to this example:

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

My problem is if the user selects/deselects some checkboxes but then never clicks the "Filter" button. I would basically like to reset their selections to what they initially had before the menu closes but don't think the filter menu has such an event.

How can I bind to the menu closing?

like image 211
thienedits Avatar asked Oct 01 '14 21:10

thienedits


1 Answers

It looks like the filter menu is a kendoPopup, which has a close event.

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

Since I used the filterMenuInit event of the kendoGrid, you can access the filter menu container via 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");
});
like image 116
thienedits Avatar answered Nov 15 '22 12:11

thienedits