My grid store has a default pageSize
property. On the server side I return totalProperty
parameter. So, pagination is working correctly. But, I've just built a custom filter which is supposed to specify different parameters of the grid, including pageSize
. And this is not working. In fact, I do not know how to redifine store pageSize
when using loadData
function. The whole function which reloads grid looks like this
var grid=Ext.getCmp('grid'),
frm=Ext.getCmp('remotefilter').getForm(); // this form contains grid
// parameters which can be redifined by user
frm.submit({
url:'../json/grid.php', // this code returns grid data, based on parameters
submitEmptyText:false,
success:function(form,action){
var json=Ext.decode(action.response.responseText,1);
grid.getStore().loadData(json['items']);
// I guess, here I should specify new pageSize somehow
// I can grasp a new value of pageSize from the form above
}
});
EDIT
I also tried to do this just before invoking loadData
:
grid.store.pageSize=newlimit;
Ext.getCmp('pagingToolbar').pageSize=newlimit;
But it does not help