PDA

View Full Version : Grid filters not showing after reconfigure



AssistanceArjen
28 Aug 2014, 4:08 AM
Hi, I'm fairly new to ExtJs and have some issues with grid reconfiguring,

I am working with a grid, to which i have added a listfilter in the columns, these work fine (I have added the filtersfeature in the grids required).
However, after reconfiguring the grid, with a new store and a new set of columns, the filter option has dissappeared from the column dropdown menu.
This issue only appears if the user does not click the dropdown menu before the reconfigure. Also, if the column dropdown menu is clicked after the reconfigure and then reconfigured again the filters reappear in the column dropdown menu.
After reading through the forums I have been unable to find a solution for this issue. Help would be greatly appreciated,

Kind Regards,

Arjen

scottmartin
2 Sep 2014, 4:58 AM
Reconfigure resets everything. You would need to re-apply the filters after.

AssistanceArjen
2 Sep 2014, 5:09 AM
Thanks for your reply Scott,

I have tried to reapply the filters but haven't been able to figure it out, do you by any chance have some sort of example that might point me in the right direction.

Kind regards,

Arjen

scottmartin
2 Sep 2014, 5:33 AM
Are you applying it to the store?

AssistanceArjen
2 Sep 2014, 5:36 AM
I have tried but couldn't figure it out, the filters do appear again after clicking a header and doing a second reconfigure.

scottmartin
2 Sep 2014, 6:02 AM
So something like this?



var myfilters = [{
type: 'numeric',
dataIndex: 'change',
value: {gt: 20}
}];

grid.filters.addFilters(myfilters);


Or:



store.filter({
property: 'name',
value: 'Bart'
});