-
6 Aug 2009 6:19 AM #1
paging grid params
paging grid params
One of my grids is loaded by sending several filter options that modify a db query, without these params the query cannot be constructed. In adding paging I have found that while I load the grid with the needed params the first time it does not send the orginal params for each page click. Is there a better way to do this than attaching a listener to a beforeload event and moding baseparams each time?
My initial store load:
Code:store.load({params: {filter: filter, data: data, start:0, limit:25}});
-
6 Aug 2009 6:26 AM #2
-
6 Aug 2009 6:28 AM #3
I know I could use setbaseparams on a click of the paging toolbar, im wondering if there is a better builtin way to use the params that were sent in the store in the last request.
-
6 Aug 2009 6:31 AM #4
My server is expecting filter and data each time along with start and limit, filter and data are not static they change based on the view. So I load my grid during the initial load with filter, data, start and limit, now someone clicks a page button and filter and data are not included in the next request sent. It seems like there should be some built in method of using the same params that were sent the time before without having to create a listener and set and modify base params on every click.
-
6 Aug 2009 6:33 AM #5Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 41
You could also do this:
to make the paging toolbar reuse all load options except start and limit parameters.Code:Ext.override(Ext.PagingToolbar, { doLoad : function(start){ var o = {}, pn = this.getParams(); o[pn.start] = start; o[pn.limit] = this.pageSize; if(this.fireEvent('beforechange', this, o) !== false){ var options = Ext.apply({}, this.store.lastOptions); options.params = Ext.applyIf(o, options.params); this.store.load(options); } } });
-
6 Aug 2009 6:34 AM #6
Perfect Condor, would be great to see that built in =0
-
6 Aug 2009 7:10 AM #7Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 41
-
6 Aug 2009 7:51 AM #8
Are you using remote sorting? Wouldn't that have an issue with params too?
-
28 Sep 2009 1:50 AM #9
Thanx a lot Condor this works perfectly. Really hope they include it

Been struggling for hours trying to get the paging working with my filtering
-
4 Oct 2012 2:27 PM #10


Reply With Quote