1. #1
    Sencha User
    Join Date
    Nov 2012
    Posts
    38
    Vote Rating
    0
    zeeshanjeelani is on a distinguished road

      0  

    Default store not limiting values

    store not limiting values


    Hi I am using a store with the limit of 10 records


    HTML Code:
                                        var store = Ext.create('Ext.data.JsonStore', {
                                            model: 'mdbunit',
                                            id:'store',
                                            pageSize:10,
                                            proxy: {
                                            type: 'ajax',
                                            searchall: true,
                                            url: 'php/viewbunit.php',   
                                                reader: {
                                                    type: 'json'
                                                }
                                              },
                                         
                                            
                                        listeners : {
                                                load : function(store) {
                                                   
                                                        if(store.getCount()>0)
                                                        {
                                                        Ext.getCmp('bunit').enableBtns();
                                                        
                                                        }
                                                        else{
                                                        Ext.getCmp('bunit').disableBtns();
                                                        }
                                                }
                                            }
                                          });
    
    
    
    
                                                                             store.load({
                                                        params:{
                                                            start:0,
                                                            limit: 10
                                                        }
                                                    });
                                                    

    and paging toolbar

    HTML Code:
    
                                                    id:'gpanelBunit',
                                                    dockedItems: [{
                                                    xtype: 'pagingtoolbar',
                                                    store: store,   // same store GridPanel is using
                                                    dock: 'bottom',
                                                    displayInfo: true,
                                                   
                                                    
                                                        }],
                                            

    Still Store loads all the records and if i click paging toolbar next button same records being loaded to the page 2


    Thanks

  2. #2
    Sencha User
    Join Date
    Jan 2011
    Posts
    546
    Vote Rating
    53
    willigogs is a jewel in the rough willigogs is a jewel in the rough willigogs is a jewel in the rough

      0  

    Default


    This sounds more like an issue with your server-side code.

    If you send the limit of "10", then your server side code interrogate this, and only return 10 records...

    (FYI - your code also looks like you're using EXT4, and this is the EXT3.x forum)

Thread Participants: 1