Show/Hide Column Menu filter

1 Answer 13 Views
Button Filter  Grid
Layla
Top achievements
Rank 1
Layla asked on 24 Apr 2024, 07:02 PM | edited on 25 Apr 2024, 01:11 PM

Hello there. We have a grid using the process method to filter rows. We're currently using version 5.16.1, Typescript and wanted know if there was a way to dynamically hide (or show) the column menu filter icons in the header using an external button's onClick function?

In our project, we have columns that are using a custom header cell so filtering is not available on those specific columns. However, we just want to be able to click a button outside of the grid that can toggle the filter icons to show which columns are available to filter at the same time.

Would that be possible?

1 Answer, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 26 Apr 2024, 11:21 AM

Hello Layla,

There are few options that can be used for dynamically enabling/disabling the columnMenu, but the most convenient would be by using a state variable and set the columnMenu of all columns to "null" if the value is "false". Here is an example with this approach:

Another option would be to dynamically add a class name to the Grid and hide the column menu element with CSS.

 

Regards,
Konstantin Dikov
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Kendo family, check out our getting started resources!

Tags
Button Filter  Grid
Asked by
Layla
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Share this question
or