views:

94

answers:

1

I have 2 advanced data grids, one above the other. They both have the exact number of columns, and pertain to each other in the same way. But each is showing different data, which is why I split into 2 grids. However, on each one you can resize the columns, what I would like is to make it so that if you resize a column on either datagrid the same column on the opposite datagrid resizes as well, so they are both always lined up.

Is there a way to do this?

Thanks!!

+2  A: 
private function onColumnStretch(e:AdvancedDataGridEvent):void
{
    (adg1.columns[e.columnIndex] as AdvancedDataGridColumn).width =  (adg2.columns[e.columnIndex] as AdvancedDataGridColumn).width;
}

Add to dategrid:

columnStretch="onColumnStretch(event)"
John Isaacks