-
grid paging reset?
hi,
i am using a store to do my search needs with extraParams. It works fine. Until i do a store.load() after set proxy.extraParams, and the paging toolbar gets confused. It shows earlier search result. For example first search found 4 pages of items, next one only 2. And I was on page 3 when close results windows, then new search will show something (i guess page 1), but the toolbar is "3" as we should be on page 3, no next, no prev works.
how can I reset paging toolbar after finished search? or how can i set store to defaults and get the reflected on paging toolbar?
many thx
-
solution found here: http://www.szabogabor.net/2012/06/03...idpager-reset/
Code:
store.loadRecords([]); //set totalCount to zero
pager.onLoad(); //refresh paging toolbar
cu
-
Simple Answer
From another thread, I was pleasantly surprised to discover that you do NOT need to reset the pager directly.
I simply called removeAll and reset the page to 1 before calling load like this:
Code:
store.removeAll();
store.currentPage = 1;
store.load();
and the pager began working exactly as it should.