Can't find my bug: Group flat data in Advanced Datagrid w'ont work
Posted
by Werner
on Stack Overflow
See other posts from Stack Overflow
or by Werner
Published on 2010-05-17T16:05:53Z
Indexed on
2010/05/17
16:10 UTC
Read the original article
Hit count: 358
Hi,
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 don'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?
Werner
© Stack Overflow or respective owner