View Full Version : Forcefit ignoring set width?

18 Oct 2011, 7:23 AM
A mystery for you--how can two grids that are exactly the same render their columns differently?

I have two grids (each in a tab) that use the same column model, but one--the one in the first tab--renders all the columns of even width (which I don't want), and the other renders them according to the sizes I'm expecting.

This is the code for the grids:

title: "Regular Time",
xtype: 'gridpanel',
columns: this.makeCM(0), //configure the columns in makeCM
store: this.empTimeStore,
columnLines: true,
forceFit: true,
enableColumnResize: false,
enableColumnMove: false

This is a paraphrase of the column model:

{header:'Project', dataIndex:'project', minWidth:90, flex:1},
{header:'Actual', dataIndex:'actual1', width:45},
{header:'Actual', dataIndex:'actual2', width:45},

I removed 'forcefit' from the first and it worked fine, but I'd still like to know why.