找不到我的错误:高级数据网格中的分组平面数据不起作用
我有一个 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>
`
根据此解释 链接文本 我已经实现了一个 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>
请告诉我您可能需要哪些其他详细信息?
I've got an ArrayCollection which is properly displayed in this Advanced Datagrid:
<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>
`
According to this explanation link text I've implemented a GroupingCollection. But it just doesn't work!
<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>
Please let me know what additional details you may need?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您必须向 AdvancedDataGrid 传递 HierarchicalData 类作为其 dataProvider 以便它识别您的 GroupingCollections
You have to pass the AdvancedDataGrid an instance of the HierarchicalData class as its dataProvider in order for it to recognize your GroupingCollections
最后我能够根据此博客实现分组: 使用 Flex 3 AdvancedDataGrid 汇总分组数据 感谢 Robusto 的指导!
Finally I was able to implement grouping according to this blog: Summarizing Grouped Data With Flex 3 AdvancedDataGrid Thanks Robusto for guiding!