-
10 Mar 2007 9:48 AM #1
paging and remoteSort
paging and remoteSort
Hello,
great framework!
I'm using a store with a PaingToolbar. Everything works fine so far, but I can't figure out how to force the grid to page 1 after clicking on a sortable header.
If I'm on page 2 it fire the correct request, but it stays on page 2. I want it to go to the beginning.
Any ideas?
thanks,
saubua
-
10 Mar 2007 10:28 AM #2
Where dataSource is your DataSource and myPageSize is your page size:
Code:dataSource.load({params:{start: 0, limit: myPageSize}});
-
10 Mar 2007 10:59 AM #3
OK, thanks.
Originally Posted by Animal
But where should I put this line of code?
Ext.Store.sort() calls Ext.store.load() calls proxy.load()
and proxy does not know anything about sorting...
-
21 Jun 2011 2:50 PM #4
Did you ever find a solution to this? I am looking for the same thing.
-
14 Oct 2011 12:08 PM #5
If you're looking for a 4.x solution to this problem (and given the date of your post, I kind of hope you are) then add the following to your store definition:
This works if your store is defined as an extension of Ext.data.Store:Code:doSort: function() { this.currentPage = 1; this.callParent(arguments); }
Code:Ext.define('pagingStore', { extend : 'Ext.data.Store',... } yourStore = Ext.create('pagingStore');
Similar Threads
-
a2: Datastore: remotesort fails if name is not equal mapping
By Wolfgang in forum Ext 2.x: Help & DiscussionReplies: 3Last Post: 12 Mar 2007, 12:45 PM -
Paging Grid...
By fredstra in forum Ext 1.x: Help & DiscussionReplies: 5Last Post: 7 Mar 2007, 7:55 AM -
Help with POST and paging
By Hillgod in forum Ext 1.x: Help & DiscussionReplies: 3Last Post: 6 Mar 2007, 8:06 AM -
regarding paging grid
By noname in forum Ext 1.x: Help & DiscussionReplies: 7Last Post: 1 Mar 2007, 4:54 AM


Reply With Quote