PDA

View Full Version : What is the best way to remove buttons from PagingToolBar ?



shakerkk
7 Oct 2014, 12:09 AM
I want to remove some button from pagingtoolbar i did something like this :

Ext.define('aw.grid.PagingToolbar', { extend: 'Ext.toolbar.Paging',
alias: 'widget.custompaging',
requires: ['aw.grid.PageLimit'],
displayInfo: true,
plugins: 'pagesize',
listeners: {
beforerender : function() {
this.child('#refresh').hide();
this.child('#first').hide();
this.child('#last').hide();
this.child('#displayItem').hide();
}
}
});

But i`m not sure if its good because i belive there are some methods that are still making the buttons and slows my app :-?

watertrac_dev
7 Oct 2014, 6:22 AM
Not sure it's the best way, but it does give you the ability to specify what items should be hidden at the time of defining/creating the PagingToolbar.

be2