PDA

View Full Version : Refresh Sencha grid 4.2.2



NishantGupta
1 Apr 2014, 4:29 AM
Hi,

1. I am using EXTJS Grid 4.2.2 and i am using clear filter button in toolbar which calls grid.filters.clearFilters() and it is working fine. But it is not clearing the data in filter field. So please suggest me how can i clear the data in filter field.

2. How to refresh grid on a click of button.

Thanks,
Nishant

Zinnia
1 Apr 2014, 5:10 AM
Use the below code after clearfilter()
grid.getView().refresh()

lp1051
1 Apr 2014, 5:52 AM
I guess you will need to loop the filters and reset the values manually based on the filter type. Might be a quite complex. But I think to loop the filters you can use:
grid.filters.filters.each(function(filter) { // do something with the filter});