• Hello,

    I noticed that if a grid is placed inside
    tags, and the width of the grid is set to auto (or just left unspecified), the grid becomes like 4 times the actual width of the page.

    If the grid is NOT inside the
    tags, and the width of the grid is set to auto (or just left unspecified), the grid spans the actual width of the page as expected.

    I tested this with the example in http://extjs.com/deploy/dev/examples/grid/array-grid.html.

    First I commented out line 90 (//width:600,) in "array-grid.js"

    Then tested in firefox 3.0 and iexplorer7, with version Ext JS Library 2.1

    The width of the grid in firefox was ok. In iexplorer7 it was weird, the header as ok but cells were wider than the screen.

    Then I added the
    tags in line 27 in "array-grid.html" like so:



  • if no explicit width is set, then it defaults to 'auto' -- most browsers handle this ok, m$IE simply chooses to choke and die.
    you must specify an explicit width for GridPanels.

    as for the
    problem -- it's anyone's guess. but running without an explicit GridPanel width in a non Ext-managed layout (i.e. rendering to a html container) in this case is suicide.


  • if no explicit width is set, then it defaults to 'auto' -- most browsers handle this ok, m$IE simply chooses to choke and die. you must specify an explicit width for GridPanels.

    OR let a layout (or a custom patch) handle sizing. But some code must supply a width for IE.


  • Well, I managed to get it working by setting the width dynamically. I set the width of the grid by width: el('topContainer').getWidth()-200,
    topContainer is just a div that I know will always be the width of the browser, and the -200 is just so that the grid leaves some space for other suff. The last thing I did was add an event so that the grid changes it's size whuen the browser gets resized.
    Ext.EventManager.onWindowResize(
    function (w, h){
    activitiesGrid.setWidth(el('topContainer').getWidt h()-200);
    },
    this);

    Working well so far!







  • #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about [2.1] grid inside with auto width error , Please add it free.