         const paddingTop:Number = columnHeaderBar.getStyle("paddingTop");
         const paddingBottom:Number = columnHeaderBar.getStyle("paddingBottom");
             
-        columnHeaderBar.measuredWidth = Math.ceil(grid.contentWidth + paddingLeft + paddingRight);
+        columnHeaderBar.measuredWidth = Math.ceil(grid.getPreferredBoundsWidth() + paddingLeft + paddingRight);
         columnHeaderBar.measuredHeight = Math.ceil(maxRendererHeight + paddingTop + paddingBottom);
     }
 

            
            // layout the renderer
            
            var isLastColumn:Boolean = columnIndex == (columnsLength - 1);
            var rendererX:Number = grid.getCellX(0, columnIndex) + paddingLeft;
            var rendererWidth:Number = grid.getColumnWidth(columnIndex); 


            if (index < visibleColumnIndices.length)
                columnIndex = visibleColumnIndices[index];
            else
                columnIndex += 1;  // TBD(hmuller): find the next visible column
           
            if (columnIndex >= columnsLength)
                break;
