 import mx.core.ILayoutElement;
 import mx.core.IVisualElement;
 import mx.core.IVisualElementContainer;
+import mx.core.UIComponent;
+import mx.core.UIComponentGlobals;
 import mx.core.mx_internal;
 import mx.events.CollectionEvent;
 import mx.events.CollectionEventKind;

import spark.components.Grid;
import spark.components.Group;
import spark.components.IGridItemRenderer;
import spark.layouts.supportClasses.LayoutBase;

use namespace mx_internal;

        if  ((rowIndex < rowCount) && (bounds.width == 0)) // implies no columns
            bounds.width = visibleGridBounds.width;
        
        // Call initializeRowBackground() if possible
        
        const gridRowBackground:IGridRowBackground = rowBackground as IGridRowBackground;
        if (gridRowBackground)
            gridRowBackground.initializeRowBackground(grid, rowIndex);
        
        layoutGridElementR(rowBackground, bounds);
    }

