如何在Ext.grid.ColumnModel中设置宽度百分比? [英] How to set width in Ext.grid.ColumnModel in percentage terms?
本文介绍了如何在Ext.grid.ColumnModel中设置宽度百分比?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在百分比中设置Ext.grid.ColumnModel中的宽度?
How to set width in Ext.grid.ColumnModel in percentage terms?
推荐答案
总共100个并使用forceFit配置视图,例如
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
}
});
这篇关于如何在Ext.grid.ColumnModel中设置宽度百分比?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文