View Full Version : [CLOSED] MoveLast when PagingToolbar loads

Feb 20, 2013, 10:58 PM
I'm trying to move a paging toolbar to the last page when a gridpanel first loads on a screen.

I did see this post: http://forums.ext.net/showthread.php?16161-Paging-Automatically-move-to-last-record

And I tried this:

.Listeners(l =>
l.AfterRender.Handler = "#{GamesPager}.moveLast();";

But it is not working. I've also tried listening on different events, but have not found one that works.

Any ideas on how I might accomplish this?

Feb 21, 2013, 1:26 AM

Try to listen Load event of the Grid's store:

.Listeners(l =>
l.Load.Handler = "store.loadPage(Math.ceil(store.totalCount/store.pageSize));";
l.Load.Single = true;

Feb 21, 2013, 5:19 AM

In the case with remote paging, you could set up some parameter into a Store's AutoLoadParams which would mean "load last page" and which you could take into account within a data handler.

Feb 21, 2013, 12:38 PM
Thank you both for the responses.

Daniil - since this particular grid panel is displaying a relatively small record set, I'm not using remote paging. I expect I will have a need for remote paging soon, however, so I will keep your reply in mind. ;)

Baidaly - your listener on the store worked. Thanks.