View Full Version : Grid, paging toolbar - limit not changing

John Sourcer
15 Jun 2007, 11:41 PM
Hi All,

I have a grid and paging toolbar setup nicely. JSON data is correct with totalcount and all looks good. The first page displays fine BUT with a page size set to 25 and limit set to 25, the toolbar for the first page displays 'showing 1 - 22 of 65' !

Edit: Fixed error in my JSON with duplicate ID's

Still have a problem with this though, where the limit value never changes!
Also, when the next arrow is clicked, the 'start' value increases to 25 but the 'limit' values stays at 25?

var gridFoot = grid.getView().getFooterPanel(true);
var paging = new Ext.PagingToolbar(gridFoot, ds, {
pageSize: 25,
displayInfo: true,
displayMsg: 'Displaying items {0} - {1} of {2}',
emptyMsg: "No items to display"

ds.on('beforeload', function() {
ds.baseParams = {
term: 'sport'

ds.load({params:{start: 0, limit: 25, term: 'sport'}});

16 Nov 2007, 1:06 AM
Hi all,

I just solved a problem with a Grid using a paging PagingToolbar and a form where the user can enter some filter criteria for the query in the backend.

The Grid and the PagingToolbar worked fine without using the filter criteria from the from. The paging ist set to 10 results per page and I can move the pages back and forth.

Then after adding a filter criteria the PagingToolbar said:

Displaying item 1-5 from 715, then after clicking "next" it said: Displaying 10-17 from 715. I checked the server side query and the returned json value. Everything was fine. It returned always 10 rows, but not all rows were displayed.

After searching this forum I found this thread which gave me an important information:

The id of the rows!

I just returned the primary key from the database table as id. This works fine as long as the total count does not change. There must be some caching with row ids.
The solution is to generate an unique hash as id for each row in every query.
Then everything works fine.