How to set a fixed width for CheckboxModel column in GridPanel?

extjs, extjs4

Solution

It's a bug in Ext 4.0.7:

It's the `forceFit: true` that screws up. They suggest to set `flex:1` on the remaining columns. That worked for me but I would still like to see it smaller. I'll probably go for a css solution.

thread on the sencha forum

Problem

I needed checkbox selection mode in my gridpanel, so i use `Ext.selection.CheckboxModel` component, but my problem is about the column (checkbox column) which this component will append to my grid. I want to set a fixed width for it, because this column's width may vary when i resize the browser window. I use the code below, but it doesn't work: ``` constructor: function() { var me = this; me.selModel = Ext.create('Ext.selection.CheckboxModel', {width: 16}); me.callParent(arguments); } ``` This is code snippet and snapshot of my users table: ``` Ext.define('VDOA.view.users.Table', { extend: 'Ext.grid.GridPanel', alias: 'widget.usersgrid', forceFit: true, selType: 'checkboxmodel', //selType: 'rowmodel', //selModel: Ext.create('Ext.selection.CheckboxModel'), title: '', initComponent: function() { ... } }); ```

Original source