View Full Version : add column filter in grid

8 May 2015, 3:11 AM

I have grid, and i need add column filter in columns.
But grid does not I design, I can only subscribe to the event beforerender, and tweaking.

Please tell me how to add a filter to the grid column?

And I need to add a filter in the column, similar of searchfield.
User enters text, and it should be a button, a cross, which resets the filter, similar searchfilter.

Thanks, sorry for my bad english

8 May 2015, 4:36 AM
I think I understand what you mean and while I don't have experience with adding fields inside column headers nor do I know if it's possible or not but what I have done in the past is add a toolbar to the grid. Inside that toolbar add your fields and button. Aside a click event to the Search button and within that event, filter the store according to your search fields.

8 May 2015, 10:11 AM
The beforerender event has the grid as its first argument. You can try to get the columns by invoking getColumns. From there, get the column where you need to add the filter, and use the column's items property to add the filter. Let me know how it goes.

Gary Schlosberg
14 May 2015, 3:30 PM
Here's an example that might help: