Issue with Grid updating within nested DIVs?

Is there an known issue with Grid updating when the Grid is located within nested DIVs?

I have a number of popups which are filled either by XML Requests or directly with SetCellText and all exhibit the same behaviour.

The first time they are created and data loaded in around 50% of the cases the grids are blank. In subsequent calls when the data is just being loaded the grid always work perfectly.

Example code:
// Creates a Result Grid
    function _CreateGrid(inObject)
        document.write("<div id=\"divResultPopup\" class=\"result_popup\">");
        // The grid				
        this.itsGrid = new AW.UI.Grid;

    function _LoadData(inIP, inOneResult, inTwoResult, inCFResult)
        this.itsGrid.setCellText("Custom Fields",0,2);
        // Set the background
        for (var i = 0; i < 3; i++)
            var theColour;
            if (this.itsGrid.getCellText(1,i).indexOf('Success: ') > -1)
                theColour = 'CCFF33';
            else if (this.itsGrid.getCellText(1,i).indexOf('Error: ') > -1)
                theColour = 'FF4242';
                theColour = 'FFFF80';

It did not matter if I refreshed the grid was .refreshed after the load, infact it seemed to make the problem worse.
Karl Thoroddsen
November 2,

this may happen if one of the parent divs has display:none style. In this case the grid does not initialize correctly (in 2.0.1). The possible workaround is to use visibility:hidden instead of display:none or insert the grid after the div becomes visible.
Alex (ActiveWidgets)
November 6,
Thanks Alex, that was probably the case.

Karl Thoroddsen
November 6,

This topic is archived.

See also:

Back to support forum