21 Sep 2012 7:18 AM #1
Unanswered: grid paging reset?
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?
23 Sep 2012 11:25 PM #2
solution found here: http://www.szabogabor.net/2012/06/03...idpager-reset/
store.loadRecords(); //set totalCount to zero pager.onLoad(); //refresh paging toolbar
Last edited by zlevardy; 23 Sep 2012 at 11:26 PM. Reason: wrapping comment and pager.onLoad() was missing
28 Feb 2013 9:49 AM #3
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:
store.removeAll(); store.currentPage = 1; store.load();
11 Mar 2015 6:35 AM #4
I know this is an old post that I stumbled across, but you can simply do store.loadPage(1); and I think it does what you want.