PDA

View Full Version : Closable GridLayout



kgm
9 Oct 2007, 2:10 AM
Hi,
I have a Grid inside a GridPanel using BorderLayout. Now I would like to add a Close-Button to the GridPanel, but it isn't shown. What am I doing wrong?

This is my code:


var grid = new Ext.grid.Grid('widget_search_results_grid', {
ds: ds,
cm: cm,
autoExpandColumn: 'name'
});

var panel = new Ext.GridPanel(grid, {closable: true});
var layout = Ext.BorderLayout.create(
{center: {
margins:{left:3,top:3,right:3,bottom:3},
panels: [panel],
}},
'widget_search_results');

kgm
9 Oct 2007, 3:20 AM
Another relating question:

Making this panel closable is just one thing. It should also be draggable, resisable or maybe docked to the border of another element.

How can I achieve this the best way? I guess using dialogs are a bit overload and they would ruin the performance.

Magicbob
17 Oct 2007, 3:08 AM
Hello,

I have exactly the same problem. Can't make a GridPanel in a borderlayout closable even if i put clasble:true

Have you find a solution?

Magicbob