0
votes

You are my last chance :(. Im trying do work a paging grid with mvc pattern. The grid show the fisrt 21 records, but not refresh when click "next" pagingtoolbar icon. All my codes are detailed below:

The Store:

Ext.define('CRUDManantiales.store.grid.AbmUsuarios', {
    extend: 'Ext.data.Store',
    model: 'CRUDManantiales.model.grid.AbmUsuarios',

    proxy: {
        type: 'ajax',
        url: 'resources/bundles/usuarios/generarJsonTodos.php',
        reader: {
            type: 'json',
            root: 'data',
            successProperty: 'success',
            totalProperty: 'total'
        }
    }
});

The main view code:

Ext.define('CRUDManantiales.view.grid.AbmUsuarios', {
    // [..........]
    initComponent: function () {

        this.store = 'grid.AbmUsuarios';
        this.dockedItems = [{
            xtype: 'pagingtoolbar',
            store: this.store,
            beforePageText: 'Página',
            afterPageText: 'de {0}',
            displayMsg: 'Mostrando {0} - {1} de {2} registros',
            emptyMsg: 'No hay datos que mostrar',
            dock: 'bottom',
            displayInfo: true,
            pageSize: 21
        }];
        this.callParent(arguments);
    }
});

I wasted four days in this code, appreciate your assistance. Thanks !!

1
Have you checked, that you return the total record count? Cause that would typically end up without being able to navigate.sra
Yes sra, the totalRecord return value is ok. The pagingtoolbar show the correct value.ramiromd
Thanks for all. The problem are that retriving params by POST, when i must be use GET :)ramiromd
Please provide your request and responsesra

1 Answers

0
votes

Thanks for all. The problem has been resolute. The fail was that i was using POST array in my PHP script and needed use GET method. :)