[CLOSED] setting column width in javascript has no effect

  1. #1

    [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:

    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]
  2. #2
    Sorry, please ignore I seem to have fixed it, thanks. Please close this thread.

Similar Threads

  1. Replies: 5
    Last Post: Nov 17, 2011, 7:56 AM
  2. [CLOSED] Grid Panel : Column width (Auto width)
    By legaldiscovery in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Sep 24, 2011, 8:31 PM
  3. Replies: 1
    Last Post: Apr 25, 2011, 4:07 AM
  4. Replies: 6
    Last Post: Jun 11, 2010, 12:47 PM
  5. [CLOSED] Code Behind Buttons, property Width has no effect
    By jcanton in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Jul 02, 2009, 2:02 PM

Posting Permissions