PDA

View Full Version : PagingToolbar.moveFirst() without new Store load



Realnub
10 Nov 2009, 2:59 AM
Hello,

i am using a gridPanel with JsonStore and a PagingToolbar. All works fine, but there is one Problem. I put a Textfield and a Button in the PagingToolbar - for some search action. This causes to reload the Store. Now i want to set the activePage on Page 1.
How to handle this without reloading the store? PagingToolbar.moveFirst() causes an reload.

Condor
10 Nov 2009, 3:55 AM
If the paging toolbar isn't on the first page then the store simply doesn't contain the data for the first page and needs to load it.

(assuming you are using remote paging - this isn't true for local paging)

Realnub
10 Nov 2009, 4:06 AM
that`s true, but with my own textfield/button i change the baseParams of the store and reload it. the PagingToolbar don`t recognize this.

i think i have the solution. your clear words helped me alot. i dont need to do moveFirst and reload. i just need to change baseParams and than call movefirst.