How to set width in Ext.grid.ColumnModel in percentage terms?
+1
A:
Use numbers for the column widths with a total of 100 and configure the view with forceFit, e.g.
var grid = new Ext.grid.GridPanel({
cm: new Ext.grid.ColumnModel({
columns: [{
header: 'header1',
dataIndex: 'data1',
width: 30
},{
header: 'header2',
dataIndex: 'data2',
width: 30
},{
header: 'header3',
dataIndex: 'data3',
width: 40
}]
}),
viewConfig: {
forceFit: true
}
});
BrennaSoft
2010-07-04 17:49:19