         var visibleLeft:Number = 0;
         var visibleRight:Number = 0;
         
-        const dataGrid:DataGrid = grid.dataGrid;
-        const vsbVisible:Boolean =
-            (dataGrid && dataGrid.scroller && 
-             dataGrid.scroller.verticalScrollBar && dataGrid.scroller.verticalScrollBar.visible);
-        
         // This isn't quite as simple as: 
         //     for each (var columnIndex:int in visibleColumnIndices)
         // since the GridColumnHeaderGroup may be wider than the grid because it

import spark.components.GridColumnHeaderGroup;
import spark.components.Group;
import spark.components.supportClasses.GroupBase;
import spark.core.NavigationUnit;
import spark.layouts.supportClasses.LayoutBase;

use namespace mx_internal;

        gridColumnHeaderGroup.visibleSortIndicatorIndices = indices;
    }
}
}

