Skip to content

Instantly share code, notes, and snippets.

@bahattincinic
Last active August 29, 2015 14:06
Show Gist options
  • Save bahattincinic/164a615fc1ef43c2f748 to your computer and use it in GitHub Desktop.
Save bahattincinic/164a615fc1ef43c2f748 to your computer and use it in GitHub Desktop.
Updating PagingToolbar on ExtJs Filter (Version 3)
var store = new Ext.data.JsonStore({root: "data", url: "<url>", totalProperty: 'totalCount', idProperty: 'id',method: 'POST', fields:[]});
var page = new Ext.PagingToolbar({pageSize: 25, store: store});
var grid = new Ext.grid.GridPanel({store: store, tbar: page});
store.load({params:{start:0, limit:25}});
grid.render('#exapmle');
grid.on('filterupdate', function(){
var o = {}, pn = this.store.paramNames;
o[pn.start] = 0;
o[pn.limit] = page.pageSize;
this.store.load({params:o});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment