Strange as it may seem, an AdvancedDataGrid really doesn’t like to let you dictate how it lays out it’s columns. Especially when you decide to turn off the horizontal scroll policy. Data grids really hate that.

The end result is that with horizontal scrolling disabled, the data grid will render the columns however it thinks is best. This often results in columns having far less space than you intended, or on the flip side, being unrealistically spacious. This is true even if you define the width (or minimum width) of your columns.

But lucky for us, there’s a relatively easy fix:

public function resizeColumns () : void
{
    grid.validateNow ();

    // forces the columns to size themselves properly
    for each (var column : AdvancedDataGridColumn in grid.columns)
    {
        column.width = column.width;
    }
}


It may seem a bit ridiculous, but if you execute this method whenever the underlying data in your data grid changes, you’ll have beautifully laid out columns.