     {
         const columnHeaderGroup:GridColumnHeaderGroup = columnHeaderGroup;
         const grid:Grid = grid;
-        
-        if (!columnHeaderGroup || !grid || !grid.columns)
+        const columns:IList = columns;
+        
+        if (!columnHeaderGroup || !grid || !columns)
             return -1; 
         
         const paddingLeft:Number = columnHeaderGroup.getStyle("paddingLeft");

            return -1;
        
        const isFirstColumn:Boolean = columnIndex == grid.getNextVisibleColumnIndex(-1);
        const isLastColumn:Boolean = columnIndex == grid.getPreviousVisibleColumnIndex(grid.columns.length);
        
        const columnLeft:Number = grid.getCellX(0, columnIndex);
        const columnRight:Number = columnLeft + grid.getColumnWidth(columnIndex);

            
        // create a new renderer

        const columns:IList = columns;
        if (!columns || (columns.length <= columnIndex))
            return null;
        const column:GridColumn = columns.getItemAt(columnIndex) as GridColumn;
        if (!column.visible)
            return null;
        
