var colModel = new Ext.grid.ColumnModel({
columns: [ columns here...]
})
var grid = new Ext.Ext.grid.GridPanel({
store: store,
loadMask: true,
autoExpandColumn: 'itemDescription',
stripeRows: true,
colModel: colModel
})
var form = new Ext.FormPanel({
labelWidth: 150,
bodyStyle: 'padding:2px 5px;',
autoScroll: true,
items:[
new Ext.form.FieldSet({
layout: 'fit',
collapsible: true,
height:300,
items: [
grid
]
}
]
})
The grid does not change its width once the window gets resized…
Any thoughts???
Your
Gridwill resize according to theFieldSetdue tolayout: 'fit'. Since theFormPaneldoesn’t have a layout set, it automatically useslayout: 'form'. TheFieldSetwill act as a normalForm Fieldand thus needs to be configured to resize it self. This can be done using theanchorproperty of theFormLayout:This will tell the
FieldSetto always stay 0 pixels from the right edge of theFormPanel.