动态添加行到 AdvancedDataGrid
我想将新行动态(运行时)添加到我的 AdvancedDataGrid 中。 我可以将其添加到数据模型中,但找不到使表格呈现并显示新行的方法。
我正在寻找的是创建可扩展项目的效果,其中单击行将显示“附加信息”(如抽屉),单击行展开按钮将显示其子项。
我看到了 dataGrid 的示例(http://livedocs.adobe.com/flex/3/ html/help.html?content=advdatagrid_10.html),但不适用于 AdvancedDataGrid。
我发现做到这一点的唯一方法是添加一个新的子项并使用 openItem,但这会导致其他子项也可见。
非常感谢任何帮助
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
添加新项目后,您需要重新验证整个数据网格,以便所有新元素都可见。
这应该有帮助:)
you need to revalidate the whole datagrid after you added a new item, so that all the new elements can become visible.
This should help:)