Hybrid View
-
18 Aug 2011 5:00 PM #1
Answered: Additional Parameters not persistent on paging grid
Answered: Additional Parameters not persistent on paging grid
The paging grid loads great the first time. But when I try to click to the next page it appears that my extra parameter does not get POSTED. I have set it to the store's baseParams as it is advised on http://www.sencha.com/learn/grid-faq/ but that does not seem to work.Code:var store = Ext.create('Ext.data.Store', { pageSize: itemsPerPage, autoload: false, model: 'project', baseParams: { 'extra': 'complete' }, proxy: { type: 'ajax', url : '/PHP/proxy.php', reader: { type: 'json', root: 'data', totalProperty: 'total' } } }); store.load({ params:{ start: 0, limit: itemsPerPage, 'extra': 'complete' } }); var grid = Ext.create('Ext.grid.Panel', { title: 'blah', store: store, columns: [ ... ], height: 500, width: 1100, dockedItems: [{ xtype: 'pagingtoolbar', store: store, // same store GridPanel is using dock: 'bottom', displayInfo: true }], renderTo: 'topic-grid' }); // trigger the data store load store.loadPage(1);
Thanx in advance
Dino
-
Best Answer Posted by kliolios
It looks baseParams do work after all if they are set in the proxy and not the store. Sorry for posting this.
-
18 Aug 2011 5:20 PM #2
It looks baseParams do work after all if they are set in the proxy and not the store. Sorry for posting this.
-
19 Aug 2011 2:30 PM #3
I was too hasty. It actually still not working. Stevil please feel free to merge this thread with my original one or keep them separate. I created this one because:
1. Didn't realize I had to enclose code in code tags
2. The forum probably prefers different issues to be in different threads
-
20 Aug 2011 12:27 PM #4
Problem solved. Apparently you have named baseParams in extJS v4 extraParams


Reply With Quote