PDA

View Full Version : PageSize paging plugin....



psm1963
14 Nov 2010, 6:27 AM
Has anyone got an update to the PageSize plugin that works for extjs 3.3. This allows one to have a drop down on the paging toolbar so that a user can define the number of items in a page. Conversely, does anyone have code that I canadd to existing paging toolbar that will do this. Thank you..

JanVenekamp
15 Nov 2010, 11:41 AM
To accomplish what you want add a ComboBox to the PagingToolbar that reloads the store on select.



...
bbar: new Ext.PagingToolbar({
...
items:[
'-',
new Ext.form.ComboBox({
...
listeners: {
select: function(obj, rec) {
tb.pageSize = numOf;
store.baseParams = Ext.apply({}, {limit: rec.get('valuecol')}, store.baseParams);
store.load({start: 0});
}
}
})
]
})
...