开发者

How to set width in Ext.grid.ColumnModel in percentage terms?

How to set width in Ext.grid.ColumnModel in percent开发者_开发问答age terms?


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
     }
});
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜