Results 1 to 4 of 4

Thread: Additional Parameters not persistent on paging grid

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Sencha User
    Join Date
    Aug 2011
    Posts
    12
    Answers
    1
    Vote Rating
    0
      0  

    Default Answered: Additional Parameters not persistent on paging grid

    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);
    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.

    Thanx in advance
    Dino

  2. It looks baseParams do work after all if they are set in the proxy and not the store. Sorry for posting this.

Tags for this Thread

Posting Permissions

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