PDA

View Full Version : Disable grid panel close button (Ext.panel.Tool)



mkrakowski
5 Mar 2013, 2:07 PM
I have 2 panels showing within 1 tab. The first are checkboxes, and the second a grid listing. The grid listing header contains a close box. How do I remove this?

Tools.close shows up in console.log, however it's undefined when trying to access it directly. Seems that it's not available in the DOM when I'm setting setStyle.


win.tools.close.setStyle({display:"none"});

console.log(win.rendered); //Returns false.

Also tried..



closable : false,
tools:[{
type : 'close',
style : { display: 'none' },
closable : false,
}],



Thanks!

Avman2119
5 Mar 2013, 2:36 PM
can you post the code of your grid?

mkrakowski
5 Mar 2013, 2:52 PM
Ok, it was an oversight on my part, closable does work as it should.


closable : false,

Issue was that the code is merging several objects called 'options' that supply the params for the store and grid, and closeable was set true by the constructor function. :|

Thanks.