PDA

View Full Version : PagingToolbar problem



umut
13 Jul 2007, 1:58 PM
I have the following toolbar:


var pagbar = new Ext.PagingToolbar(gridFoot, ds, {
pageSize: 25,
displayInfo: true,
displayMsg: "Showing {0} - {1} of {2}"
});
...

some other code

...

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


But I receive the message(in one page):

Showing 1 - 146 of 1

Instead of (for the first page):

Showing 1 - 25 of 146

It also kills the paging, so all the records are shown at one page; which in turn increases the load time dramatically.

I think the problem is at "{2}" variable but I don't know how to fix it. Any ideas?

umut
13 Jul 2007, 2:59 PM
Problem transformed: It turned out that my script returned wrong totalCount value; I fixed it. Now, there is a new problem: It still shows all the values instead of 25 but also shows a second page. When next is clicked, it displays (for 26 entries):


Showing 26 - 51 of 26

Any ideas?

umut
13 Jul 2007, 3:30 PM
Thanks to Micha's post:

http://extjs.com/forum/showthread.php?t=2779