Using ExtJS 5.1, when I load grid panel it is showing correct paging number in paging tool. but during page load time it always show Page 1 of 5. The Previous and Next Buttons are disabled.
#
var store = new Ext.data.Store({
autoLoad: {params:{start: 0, limit: 5}},
pageSize: 5,
remoteSort: true,
model: 'TenantDetails',
proxy: {
type: 'ajax',
enablePaging : true,
url: 'http://localhost:8080/restcountries-dev/rest/page/v0.5/tenant',
reader: new Ext.data.JsonReader({
type: 'json' ,
totalProperty:15,
rootProperty:'tenant'
})
},
listeners:{
load:function(store){
Ext.getCmp('tenant_detail_grid').getSelectionModel().select(0, true);
}
}
});
#
And Paging toolbar is defined as below.
bbar:
Ext.create('Ext.PagingToolbar', {
store: store,
displayInfo: true,
displayMsg: '{0} - {1} of {2}',
emptyMsg: "No topics to display"
})
#
Don't know what exactly I'm missing.Thanks