开发者

Add row dynamically to AdvancedDataGrid

开发者 https://www.devze.com 2023-01-31 01:24 出处:网络
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.

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 ef开发者_运维技巧fect 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


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:)

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号