PDA

View Full Version : Dynamically load Grid into Panel



brudd
16 Sep 2009, 10:15 AM
I am trying to autoload context which has a EditorGridPanel in it. I created a sample page named "layout.html" of what I would like the end result to be. This page creates a border layout with a north and center panel. The grid loads into the center panel taking-up the entire width and height of the center panel. The grid also becomes scrollable when the brower resizes or when the column are resized.

The page "layoutAutoLoad.html" tries obtain the same end result but by loading page "testGrid.html" to add the EditorGridPanel to the center frame. This approaches causes the the last row not to auto fill when the browers is resized and the grid does NOT scroll.

I have included the files.

Can someone please tell me what I am doing wrong and point me into the right dirction?
Thanks in advance.

2 Oct 2009, 6:52 AM
Line 59+


grid = new Ext.grid.EditorGridPanel(
{
id: "editorGridePanel",
store: ds,
colModel: columnModel,
clicksToEdit: 2,
//autoScroll: true,
// applyTo: 'contentPanel',
selModel: new Ext.grid.RowSelectionModel({singleSelect:true})
});

var contentFrame = Ext.getCmp('contentFrame');
contentFrame.add(grid);
contentFrame.doLayout();
contentFrame.activate(grid);