-
29 Dec 2012 9:17 AM #1
Answered: paging toolbar page not updating
Answered: paging toolbar page not updating
I am using a paging toolbar and if I manually click to the second page it works fine but if I then issue a
store().load({params:{start:0,limit:10}}); the load works correctly, the first 10 records are sent back but the toolbar still says Page 2. Any ideas?
I am using ExtJS 4.1. Thanks.
-
Best Answer Posted by talha06
so you can use moveFirst method of PagingToolbar component. It should do the same with clicking first page icon on PagingToolbar.
-
30 Dec 2012 6:31 AM #2
is your totalProperty correct?
PHP Code:
{
"success": true,
"results": 2000, <-------// this
"rows": [ // ***Note:** this must be an Array
{ "id": 1, "name": "Bill", "occupation": "Gardener" },
{ "id": 2, "name": "Ben", "occupation": "Horticulturalist" },
...
{ "id": 25, "name": "Sue", "occupation": "Botanist" }
]
}
|:| GaiaEHR |:| A Open Source Software for Electronic Health Records - Lead Developer
-
30 Dec 2012 10:58 AM #3
Actually you don't need to load store with start and limit parameters. All you need is setting pageSize configuration in your store.
Then you can call store's load method without any extra parameters. Store will take care of start and limit paramaters. It'll load store with incremented start parameter on each page load."People will never forget how you made them feel."
linkedin.com/in/talhakabakus
-
30 Dec 2012 11:57 AM #4
The total returned is correct.
I need to reset the start param so it gets the first ten records (which it does) instead of the second ten. Everything on the server side is working correctly. The only problem is the page number doesn't reset to 1 but stays at 2.
-
30 Dec 2012 12:21 PM #5
so you can use moveFirst method of PagingToolbar component. It should do the same with clicking first page icon on PagingToolbar.
"People will never forget how you made them feel."
linkedin.com/in/talhakabakus
-
1 Jan 2013 8:24 AM #6
That did it. I never would have thought MoveFirst would be the name for the method. It should be SetPage or something similar. Thanks for the help.
-
1 Jan 2013 8:47 AM #7
glad to be helpful.
"People will never forget how you made them feel."
linkedin.com/in/talhakabakus


Reply With Quote