May 23, 2012, 1:38 PM
[CLOSED] setting column width in javascript has no effect
Hi
I set up various grids and their column models in javascript. I have tried to set the column widths using width and minWidth. However, this does not have any effect, e.g:
I should've mentioned that I am setting one of the columns to autoExpand: e.g. searchResultsGrid.autoExpandColumn = 'defaultAddress';
thank you
I set up various grids and their column models in javascript. I have tried to set the column widths using width and minWidth. However, this does not have any effect, e.g:
var masterAccountsColMod = new Ext.grid.ColumnModel({
defaults: {
//width: 120,
sortable: true,
hidden: false
},
columns: [
smod, { dataIndex: "master_account_id", width: 75, header: 'Account Ref' },
{ id: 'serviceLevel', header: 'Service Level', Width: 100, dataIndex: 'service_level' },
{ id: 'accountName', header: 'Account Name', minWidth: 350, dataIndex: 'account_name' },
{ id: 'adviser', header: 'Adviser', Width: 150, dataIndex: 'adviser_name' },
{ id: 'defaultEmail', header: 'Default Email', minWidth: 350, dataIndex: 'default_email_address' },
{ id: 'defaultAddress', header: 'Default Address', dataIndex: 'address' }
]
});
Is there a reason the widths are not being set?I should've mentioned that I am setting one of the columns to autoExpand: e.g. searchResultsGrid.autoExpandColumn = 'defaultAddress';
thank you
Last edited by Daniil; May 23, 2012 at 8:29 PM.
Reason: [CLOSED]