Results 1 to 2 of 2

Thread: [Extjs 3.2] PagingToolbar and setBaseParam

  1. #1
    Sencha User
    Join Date
    Dec 2008
    Location
    France
    Posts
    321

    Default [Extjs 3.2] PagingToolbar and setBaseParam

    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 ?

  2. #2
    Sencha User
    Join Date
    Oct 2010
    Location
    Melbourne
    Posts
    5

    Default

    Yes thats true. If you want to assign an multiple parameters you can do this

    Code:
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •