我有一个在此高级数据网格中正确显示的ArrayCollection:
<mx:AdvancedDataGrid id="drawingDataDG"
editable="true" sortableColumns="true"
headerWordWrap="true"
sortExpertMode="true"
rowCount="8" y="10" right="10" left="10"
dataProvider="{model.drawingsData}">
<mx:columns>
<mx:AdvancedDataGridColumn
headerText="Approved in Week"
dataField="ApprovedInWeek"
editable="false"
visible="true" />
<mx:AdvancedDataGridColumn
headerText="DRAWING_PK"
dataField="DRAWING_PK"
editable="false"
visible="false" />
<mx:AdvancedDataGridColumn
headerText="Drawing No"
dataField="DRAWING_NO"
editable="false"
visible="true"/>
<mx:AdvancedDataGridColumn
headerText="Drawing Index"
dataField="DRAWING_INDEX"
editable="false"
visible="true"/>
</mx:columns>
`
根据这个解释link text我实现了一个GroupingCollection。但它只是不起作用!
<mx:AdvancedDataGrid id="drawingDataDG"
editable="true" sortableColumns="true"
headerWordWrap="true"
sortExpertMode="true"
rowCount="8" y="10" right="10" left="10"
initialize="gc.refresh();">
<mx:dataProvider>
<mx:GroupingCollection id="gc" source="{model.drawingsData}">
<mx:Grouping>
<mx:GroupingField name="ApprovedInWeek"/>
</mx:Grouping>
</mx:GroupingCollection>
</mx:dataProvider>
<mx:columns>
<mx:AdvancedDataGridColumn
headerText="Approved in Week"
dataField="ApprovedInWeek"
editable="false"
visible="true" />
<mx:AdvancedDataGridColumn
headerText="DRAWING_PK"
dataField="DRAWING_PK"
editable="false"
visible="false" />
<mx:AdvancedDataGridColumn
headerText="Drawing No"
dataField="DRAWING_NO"
editable="false"
visible="true"/>
<mx:AdvancedDataGridColumn
headerText="Drawing Index"
dataField="DRAWING_INDEX"
editable="false"
visible="true"/>
</mx:columns>
</mx:AdvancedDataGrid>
请告诉我您可能需要的其他详细信息?
答案 0 :(得分:1)
您必须将Advanced {{{}}类的实例作为其dataProvider传递给AdvancedDataGrid才能识别您的GroupingCollections
答案 1 :(得分:0)
最后,我能够根据此博客实施分组:Summarizing Grouped Data With Flex 3 AdvancedDataGrid感谢Robusto的指导!