PDA

View Full Version : [Extjs 3.2] PagingToolbar and setBaseParam



senacle
29 Apr 2010, 12:09 AM
Hello !

I've a grid which is populated with a store.
The store datas are coming from sql query with some parameters.
I've red doc and searched in the forum to know how to pass these parameters when i click on the buttons of the pagingtoolbar (next, previoux, reload, last, first).

I've found that i must use setBaseParam().

After some tests which make my brain very hot (:))), i understand that setBaseParam() can set only one parameter at a time.
Is it right or i miss something ?

jprakash
27 Sep 2011, 10:18 PM
Yes thats true. If you want to assign an multiple parameters you can do this



Ext.override(Ext.data.Store, {
setBaseParam: function (name, value){
var bp = this.baseParams || {};
if(Ext.isObject(name)){
Ext.apply(bp, name);
}else{
bp[name] = value;
}
this.baseParams = bp;
}
});


Hope this helps.

--Jai