数据更改(AS3)后,在AdvancedDataGrid中刷新数据?

时间:2022-09-13 20:54:38

I am using the AdvancedDataGrid control. In that I am showing the data in hierarchical format in that I have one parent with two children. In the parent I have a checkbox, and when I select the checkbox, I have to remove the existing data of children and replace with new ones.

我正在使用AdvancedDataGrid控件。在那里我以分层格式显示数据,因为我有一个父母有两个孩子。在父母中我有一个复选框,当我选中复选框时,我必须删除子项的现有数据并替换为新的。

2 个解决方案

#1


[I am assuming this question is for AS3]

[我假设这个问题适用于AS3]

Faced a similar problem, to refresh the advanceDataGrid, after you manipulated the source data just run

面对类似的问题,刷新了advanceDataGrid,在你操纵源数据后才运行

advanceDataGrid.invalidateList();

It will then refresh on the next frame.

然后它将在下一帧刷新。

#2


To refresh the data when displaying hierarchical data simply refresh the group list in the advanced datagrid.

要在显示分层数据时刷新数据,只需刷新高级数据网格中的组列表即可。

The API is not consistent which trips many ppl up.

API不一致,导致许多人失败。

groupList.refresh();

<mx:dataProvider>
   <mx:GroupingCollection id="groupList" source="{OrderDB.flatData}" >
     <mx:Grouping>
        <mx:GroupingField name="benchmark" >
         <mx:summaries>

#1


[I am assuming this question is for AS3]

[我假设这个问题适用于AS3]

Faced a similar problem, to refresh the advanceDataGrid, after you manipulated the source data just run

面对类似的问题,刷新了advanceDataGrid,在你操纵源数据后才运行

advanceDataGrid.invalidateList();

It will then refresh on the next frame.

然后它将在下一帧刷新。

#2


To refresh the data when displaying hierarchical data simply refresh the group list in the advanced datagrid.

要在显示分层数据时刷新数据,只需刷新高级数据网格中的组列表即可。

The API is not consistent which trips many ppl up.

API不一致,导致许多人失败。

groupList.refresh();

<mx:dataProvider>
   <mx:GroupingCollection id="groupList" source="{OrderDB.flatData}" >
     <mx:Grouping>
        <mx:GroupingField name="benchmark" >
         <mx:summaries>