1. #1
    Sencha User
    Join Date
    Nov 2008
    Posts
    92
    Vote Rating
    1
    diablo is on a distinguished road

      0  

    Default Proxy undefined by changing the page in grid panel

    Proxy undefined by changing the page in grid panel


    Hi,

    I am creating a gridPanel. The are 2 problems:
    1. when i am trying to change the page i receive this error "this.proxy is undefined";
    2. pageSize : 25 has no effect.

    First the data store :

    Code:
    var myData = [["test1","100","0","0",17],
                        ["test2","100","0","0",15],
                        ["test3","18","70","11",19]];
     
    var myStore = new Ext.data.ArrayStore({
      fields: [    {name: 'a'},
                    {name: 'b'},
                    {name: 'c'},
                    {name: 'd'},
                    {name: 'e'},
             ]      
     }); 
    myStore.loadData(myData);
    next is the grid :

    Code:
    var myGrid = new Ext.grid.GridPanel({     
             id : 'grid-1', 
             store: myStore  , 
             columns: cols,
             stripeRows: true, 
             autoExpandColumn: '1', 
             height:450, 
             width:900, 
             title:'MyGrid', 
             loadMask: true,       
             bbar: new Ext.PagingToolbar({ 
                              pageSize: 25, 
                              store: myStore, 
                              displayInfo: true, 
                              displayMsg: 'Displaying topics {0} - {1} of {2}', 
                              emptyMsg: "No topics to display", 
             items:[ 
                        '-', { 
                             pressed: true, 
                             enableToggle:true, 
                             text: 'Show Preview', 
                             cls: 'x-btn-text-icon details', 
                             toggleHandler: function(btn, pressed){ 
                                 var view = myGrid.getView(); 
                                 view.showPreview = pressed; 
                                 view.refresh(); 
                             } 
                     }] 
        }), 
      viewConfig:{forceFit:true}  
     });

  2. #2
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    97
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    A PagingToolbar assumes that you want to use remote paging (with data from the server).

    If you want to do local paging you need to use the PagingStore user extension.

Thread Participants: 1