2012-10-31 41 views

回答

0

使視口的中心區域爲Container,然後將網格添加到該容器。

this.viewport = Ext.ComponentQuery.query('viewport')[0]; 
this.centerRegion = this.viewport.down('[region=center]'); 

this.centerRegion.add(new Ext.grid.Panel({title:'Grid', columns:[{text:'col1'}]})); 

實施例:

http://jsfiddle.net/Ym5T4/1/