View Full Version : GridPanel - PagingToolBar question

9 Jun 2011, 5:31 PM

I'm trying to get the Paging Toolbar working properly & I'm having issues.

I've associated the toolbar with the grid & the datastore , defined the page size (50).

All the examples that I've seen are using a mysql database & are using the "Limit" on the mysql_query function to pass in the start & end.

I'm trying to do this on a DB2 database & that keyword is not available. I've tried loading the total count of rows into the Total field then load 50 rows of data into the root keyword.

What happens is, I get 4 pages of the same 50 rows.

I've also tried loading all 200 rows thinking it would automatically split it up amongst 4 pages. What it does is give me 4 pages of 200 rows each.

Do I have to add some event to the next button to pass the starting values of the next page?

Any help would be appreciated. Very new to this product.

10 Jun 2011, 8:14 PM
Take a look at this example:


Open up a network monitoring tool (Firebug will do) and watch the requests it makes when you click the buttons in the example. You should see that it sends both start and limit parameters to the server to request a specific page. It is the server's responsibility to interpret those parameters correctly. If you return anything other than exactly what was requested (such as returning 200 results when it requested 50) then it will not work.

Note that the example above is using JSON-P as a response format: this just complicates things and from your description it doesn't sound like that will be necessary for your use case.

13 Jun 2011, 10:51 AM
Thanks for the help, Firebug was very helpful to understand what happens behind the scenes.