-
21 Sep 2012 7:18 AM #1
Unanswered: grid paging reset?
Unanswered: 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
-
23 Sep 2012 11:25 PM #2
solution found here: http://www.szabogabor.net/2012/06/03...idpager-reset/
cuCode: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
Simple Answer
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:
and the pager began working exactly as it should.Code:store.removeAll(); store.currentPage = 1; store.load();


Reply With Quote