PDA

View Full Version : Paging with PagingToolbarResizer problem



insoft
13 Feb 2013, 3:39 AM
I have Grid with a Paging toolbar and you use Ext.plugins.ux.PagingToolbarResizer.
Here is the problem: on the image "before" you can see that I am on page 3 and I the total count of records is 21 (I can see 1 record on the page 3). Now the one record is removed on the server, I press "Refresh button" and here is what I see on the "after" image. So, the Ext.toolbar.Paging has wrong behavior when the current page for the underlying store is bigger than total number of pages (and the store has 0 items in this case).4180141800

scottmartin
13 Feb 2013, 3:57 PM
Does it work correctly without the paging combo UX?

Also, is your server code sending the correct info back to calc things correctly?

Scott.

insoft
21 Feb 2013, 7:55 AM
Scott, it works correct. After refresh I ask the third page, the records after 21 (including 21th). But in that time we have only 20 records on the server. So, the result is empty. It's OK, I just want to see an empty third page and I want to have a possibility to go back to the second page of the grid. Or may be it could force the second page to be loaded.
But here what we have is just an empty grid with disabled controls (I can't navigate to the second page on the grid). That's the problem.

scottmartin
21 Feb 2013, 8:12 AM
This expected behavior as .. there is no data, same as if you loaded a store with no data.
You could alter the behavior to check the record could on store load event and place it in the previous page.

store.loadPage(page);

Scott.

insoft
21 Feb 2013, 8:23 AM
That sounds like work around. Don't you want to fix that in the next version? ;-)

scottmartin
21 Feb 2013, 8:40 AM
That would be the responsibility of the UX you are using.

Scott.