How to trigger filterMenuOpen event every time before menu opens?

1 Answer 552 Views
Filter Grid
Angelo
Top achievements
Rank 1
Angelo asked on 26 Jan 2022, 07:37 PM

Which event can I hook into in order to run custom code before a KendoGrid FilterMenu opens every time?

There is an event that runs once before it opens (filterMenuInit) and an event that runs every time after the menu opens (filterMenuOpen), but I need the third kind, which runs every time before opening.

1 Answer, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 31 Jan 2022, 11:28 AM

Hello Angelo,

There isn't a particular Kendo Grid event that is fired before the menu is opened every time the filter icon is clicked. The earliest events are the filterMenuOpen and filterMenuInit.

You could attach a click event to the filter icon element and execute your logic in there. The click will be executed before the menu is opened.

$("#grid .k-grid-filter").on("click",function() {
  console.log("executed before the menu is opened.");
});

Here is a Dojo odemo demonstartign this:

Hope this helps.

Regards,
Nikolay
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Filter Grid
Asked by
Angelo
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Share this question
or