Results 1 to 4 of 4

Thread: DataGrid inside <table>: column resize problem : IE6

  1. #1
    Ext User
    Join Date
    Apr 2007
    Posts
    7
    Vote Rating
    0
      0  

    Default DataGrid inside <table>: column resize problem : IE6

    Hi,

    I have noticed that in IE6 datagrid column resize does not work very well if the dataGrid is inside <table>

    to reproduce the issue, you can add "<table><tr><td>" just after the <body> in examples/grid/edit-grid.html

    EditorGridInsideTable.gif

    Thanks.
    Vitaliy

  2. #2
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    New York, NY
    Posts
    6,956
    Vote Rating
    20
      0  

    Default

    This is a known issue with no known workaround. It is a bug in IE.
    Jack Slocum
    Sencha Co-Founder, Ext JS Founder
    Original author of Ext JS 1, 2 & 3.
    Twitter: @jackslocum

  3. #3
    Ext User
    Join Date
    Mar 2007
    Location
    Boston
    Posts
    349
    Vote Rating
    1
      0  

    Default

    This thread : http://extjs.com/forum/showthread.php?t=2613 has a kamikaze workaround that works for me.

    Basically add the following code to your Grid's column resize event handler if Ext.isIE.

    Code:
            var view = grid.getView();
            view.refresh();
            view.updateHeaders();
            view.updateColumns();
            view.updateSplitters();
            view.updateHeaderSortState();
            view.renderPhase2.defer(1, grid);
    Sanjiv

  4. #4
    Touch Premium Member
    Join Date
    Feb 2009
    Posts
    7
    Vote Rating
    0
      0  

    Thumbs up Another approach for getting grid column resize to work for IE with CF8

    After frustration with <cfset AjaxOnLoad('ieGridFix')> I found that there is another approach that will get IE to handle this issue. My cfgrid's are inside tables as the site template is built that way and not going to be changed (although I also found no happiness outside of an html table in IE7).

    Here's the code:
    // function to render the grid after user resizes a column
    <script type="text/javascript">
    ieGridFix = function(){
    //get the grid component
    grid = ColdFusion.Grid.getGridObject("msdsGrid");
    //Fires when a column is resized by the user
    grid.addListener("columnresize", function(){ColdFusion.Grid.getGridObject("msdsGrid").render()});
    }
    </script>

    Rather than AjaxOnLoad which appears to lead to script placement problems with the built in CF/Ext calls (i.e., ieGridFix 'undefined' errors) just call the underlying script directly as in:
    <script type="text/javascript">
    if (Ext.isIE == true) {
    //alert('running IE');
    ColdFusion.Event.registerOnLoad(ieGridFix,null,false,true);
    }
    </script>

    Only do so for IE browser types.

    Bob

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •