0
votes

I am following the code in the link below to page data on a Ext.grid.Panel without success. Data is rendered altogether in the panel without paging. Apparently, the paging toolbar has no data to display but it is correctly configured to the store that has the data and it is hanging as an item of the grid.

I have copied the exact configurations of store and grid from the example below but nothing happened. Why is the data not being paged?

http://jsfiddle.net/jardalu/TE4ah/

This is my store which is linked to the grid and the paging toolbar:

constructor: function(cfg) {
    var me = this;
    cfg = cfg || {};
    me.callParent([Ext.apply({
        pageSize: 50,
        remoteSort: true,
        storeId: 'Users',
        autoLoad: false,
        model: 'AICWeb.model.User',
        sortOnLoad: false,
        proxy: {
            type: 'ajax',
            type: 'localstorage',
            simpleSortMode: true,
            reader: {
                type: 'xml'
            }
        },
        sorters: {
            property: 'email'
        }
    }, cfg)]);
}
1
In the example fiddle that you've provided, you do notice that he's actually generating the data per page in the createFakeData function? You'll have to handle similarly in you backend code. And why do you have two types for your proxy?? - Yellen
I fixed the problem, thanks! if someone is interested I could upload the code... - jvarleiza

1 Answers

0
votes

If you are using localstorage you need to implement the PagingMemoryProxy. This should be the only type on the proxy config, and enable the paging config:

    proxy: {
        type: 'pagingmemory'
        enablePaging: true,
        ...
    }