1
votes

I would like to add new row on the fly (runtime) to my AdvancedDataGrid. I can add it to the data model, but couldn’t find a way to make the table render and show the new row.

What i am seeking for is to create an effect of expandable item, where clicking on row will show "additional information" (like a drawer) and clicking on row expand button will reveal it's children.

I saw examples of this for dataGrid (http://livedocs.adobe.com/flex/3/html/help.html?content=advdatagrid_10.html), but not for AdavancedDataGrid.

Only way I found to do this is to add a new child and use openItem, but this cause the other children to be visible as well.

Any help is greatly appreciated

1
If other rows are expanded do you want them to remain open after the new row is inserted as well? Is the default state of your rows expanded or collapsed?Jason Towne

1 Answers

1
votes

you need to revalidate the whole datagrid after you added a new item, so that all the new elements can become visible.

yourDataGrid.validateNow();

This should help:)