PDA

View Full Version : How to reset the grid



sanjay_1985
11 Mar 2014, 5:16 AM
We are using Ext js 4.2, sorting and filtering in the grid , After resetting the grid, the filters are not getting cleared. Please provide some pointers.

Farish
11 Mar 2014, 7:33 AM
you can clear the filters as follows:


grid.getStore().clearFilter();

sanjay_1985
12 Mar 2014, 12:59 AM
I have tried the code but it is not working

Farish
12 Mar 2014, 1:27 AM
what do you mean by "resetting the grid"? its not clear to me what operation you are doing there. some code would help others to find out the problem.

sanjay_1985
12 Mar 2014, 1:42 AM
Reset means removing the stores along with the sorting and filtering. For us the store is removed but sorting and filtering are not getting cleared.

Farish
12 Mar 2014, 1:46 AM
the grid is just a display element. the data which is shown is from the store. if you remove the store (which you shouldnt) then it might still show the last data which was in the store. you should rather clear the store or change its proxy (url etc.) if that is what you want to achieve.