我有一个表格面板,里面有一个网格。如果此空间不足以容纳所有数据,我希望网格消耗可用空间并附加滚动条。但这不起作用,网格只会随着每个新数据而增长,并且在没有任何滚动条的情况下也会变得看不见。我怎样才能将此设置配置为如上所述的行为?
这是带有网格的表格:
{
xtype: 'form',
plain: true,
autoScroll: true,
border: 0,
bodyPadding: 5,
// which layout would I use Here? I tried anchor and vbox already
layout: '???'
items: [{
xtype: 'hidden',
name: 'SomeHidden'
}, {
xtype: 'hidden',
name: 'SomeHiddenId'
}, {
xtype: 'fieldcontainer',
layout: {
type: 'vbox',
align: 'stretch'
},
items: [ /*The form fields*/ ]
}, {
// --> this grid should consume all available space
// and append a scrollbar if the content still grows to much
xtype: 'grid',
hidden: this.stepIdent == 3,
autoScroll: true,
store: Ext.StoreMgr.lookup('JournalStore'),
features: [{
ftype: 'summary'
}],
columns: [ /*col data*/ ]
}]
}