0
votes

I'm having the next problem, I have a grid with paging that is loaded via Ajax, My problem is that i recieve about 8 millions of records, When I use paging I get from 1 to 25...etc

but when i load the pagingbar store it only gives me that i have only 25 records because my ajax only calls from 1 to 25... why is this? any ideas?

Regards

My code:

Store

Ext.define('IE.store.reenvios.Reenvio', {

extend: 'Ext.data.Store', alias: 'store.Reenvios', storeId: 'ReenviosStore', model: 'IE.model.reenvios.Reenvio',

proxy: {
    type: 'ajax',
    api: {
        //
        read: 'resendTransaction/fetchResend'
    },
    reader: {
        type: 'json',
        root: '', 
        totalProperty: 'rowCount'
    }
},

autoLoad: false,
autoSync: false

});

Controller

store.getProxy().extraParams = { 'folioType':folioT.value, 'folio':folioN.value, 'status':estatus.value, 'date':date.value, 'start':0, 'limit':26, 'pageSize':25,

      'tamanoPagina':''};

      store.load({...
1
What does your JSON response from the server look like?existdissolve

1 Answers

1
votes

Seeing the JSON response would be helpful, so I could see the name of the property that contains the total number of records.

I have a feeling the issue is because you set totalProperty: 'rowCount'. The property rowCount is likely the number of rows returned (ie, 25 or less), but you want the totalProperty set to the property that contains the total number of records. See the docs for more info. http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.data.reader.Reader-cfg-totalProperty