Results 1 to 3 of 3

Thread: Pager does not work

  1. #1
    Sencha User
    Join Date
    Apr 2013
    Posts
    10

    Default Answered: Pager does not work

    I'm using 4.0.7. When you add a pager still shows all the records. Here is my code
    PHP Code:
     var Grid_ostatok Ext.create('Ext.grid.Panel',{
                    
    storeStore_ostatok,
                    
    height470,
                    
    columns:[{
                        
    text:'??????????',dataIndex:'name'
                        
    flex:1
                    
    },{
                        
    text:'??????',dataIndex:'dohod',
                        
    renderer:formatCurrencyalign:'right',editor:{maskRe: /[\d\\.]/}
                    },{
                        
    text:'??????',dataIndex:'rashod',
                        
    renderer:formatCurrencyalign:'right',editor:{maskRe: /[\d\\.]/}
                    }],
                    
    plugins: [Ext.create('Ext.grid.plugin.CellEditing', {
                        
    clicksToEdit1
                    
    })],
                            
                    
    dockedItems: [{
                        
    xtype'pagingtoolbar',
                        
    storeStore_ostatok,   // same store GridPanel is using
                        
    dock'bottom',
                        
    emptyMsg"??? ???????",
                        
    displayMsg'???????? {0} - {1} ?? {2}',
                        
    displayInfotrue
                    
    }]
                }); 
    and store
    PHP Code:
     var Store_ostatok Ext.create('Ext.data.Store',{
                
    proxy: {
                    
    enablePagingtrue,
                    
    type'ajax',
                    
    url'inc/ajax/ostatok.php?get=2'
                
    },
                
    fields:[
                    {
    name:'id',type:'int'},
                    {
    name:'name',type:'string'},
                    {
    name:'edrpou',type:'int'},
                    {
    name:'dohod',type:'float'},
                    {
    name:'rashod',type:'float'}
                ],
                
    //autoLoad: {start: 0, limit: 50},
                
    autoLoad: {params: {start0limit50}},
                
    pageSize50,
                
    /*listeners: {
                'beforeload': function(){
                    var fv_array = clients_get_filters();
                    Store_ostatok.getProxy().extraParams = {
                        filter_param_name: fv_array['name'],                    
                        filter_param_kod: fv_array['kod']
                    };
                }
            }*/        
        
    }); 
    I try and so and so - loaded all the records, but the pages are in the pager

  2. The server-side is responsible for returning the requested page of data, as specified by the start and limit parameters.

  3. #2
    Sencha User friend's Avatar
    Join Date
    Apr 2011
    Posts
    895
    Answers
    106

    Default

    The server-side is responsible for returning the requested page of data, as specified by the start and limit parameters.

  4. #3
    Sencha User
    Join Date
    Apr 2013
    Posts
    10

    Default

    Thanks. I've already got it. On the server, make the necessary inquiries.

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
  •