Get Free Trial

filteropen callback does not prevent native Filter Window from opening

Marten Koedam asked on February 7, 2018

In the documentation for the filteropen event it states that providing a handler will prevent the native Filter Window from opening. However, when we supply a handler, it does not prevent the native Filter Window from appearing.
This same behaviour can also be seen from JSFiddle example you have on the filteropen page; the alert used will block the native window from appearing but that’s only because alerts are blocking. When you press “OK” on the alert it will still open the native Filter Window.
Is there anyway we can prevent the default filteropen behaviour from executing?

3 answers

Tanya Gryshko Tanya Gryshko Flexmonster February 7, 2018

Hello, Marten,
Thank you for posting your question here!
filteropen event is useful for creating your own customized Filter Window and simply providing a handler does not prevent the native Filter Window from opening. If you want to hide the native Filter Window, please use showFilter: false option. This option is set for grid and charts separately. We have prepared an example where the opening columns/rows filter controls are not visible: (check line 28).
Here is the list of all available options to specify appearance and functionality for customers: Options Object.
Please let me know if you have other questions.

Marten Koedam February 8, 2018

Thank you for your response, it is not what we were looking for tho. You might want to update the documentation on the filteropen event page, as it states the following:
If this handler is defined the native Filter Window will not appear. In other words, the component’s handler will be replaced by the JS handler.
Which is actually what we want, as we don’t want to hide the filter icons, just a custom JS handler. As a work around we’ll hide the native filter window with css I suppose.

Ian Sadovy Ian Sadovy Flexmonster February 8, 2018

Hello Marten,
Thank you for the answer.
We definitely will update the docs.
As for the custom filter window, here is the quick sample how to hide the default filter using CSS and JS –
Hope it helps.

Please login or Register to Submit Answer