I'm currently trying to populate an flex 3 AdvancedDatagrid with xml received from a HTTPService
with id="produktMatrix_data"
. The layout is as follows: http://pastebin.com/NqFqgj86
The result should look like:
The further rows like KID, M.., etc. will be populated by other sources, be hardcoded, or by user input and are beyond scope of this question.
My code for the AdvencedDataGrid is as follows:
<mx:AdvancedDataGrid dataProvider="{matrixProvider}">
<mx:columns>
<mx:AdvancedDataGridColumn headerText="Zielprodukt" dataField="prod_txt" editable="false" >
</mx:AdvancedDataGridColumn>
<mx:AdvancedDataGridColumn headerText="KID" dataField="kid" editable="true" editorDataField="selectedItem" >
</mx:AdvancedDataGridColumn>
<mx:AdvancedDataGridColumn headerText="MVLZ-Bezug" dataField="mvlz_bez" >
</mx:AdvancedDataGridColumn>
<mx:AdvancedDataGridColumn headerText="MVLZ-Dauer" dataField="mvlz_dauer">
</mx:AdvancedDataGridColumn>
<mx:AdvancedDataGridColumn headerText="MVLZ-Einheit" dataField="mvlz_einheit">
</mx:AdvancedDataGridColumn>
<mx:AdvancedDataGridColumn headerText="Status" dataField="status" editable="true">
</mx:AdvancedDataGridColumn>
<mx:AdvancedDataGridColumn headerText="Prämierung" dataField="praemie" editable="true">
</mx:AdvancedDataGridColumn>
<mx:AdvancedDataGridColumn headerText="Gültig ab" dataField="datum_ab" editable="true">
</mx:AdvancedDataGridColumn>
<mx:AdvancedDataGridColumn headerText="Gültig bis" dataField="datum_bis" editable="true">
</mx:AdvancedDataGridColumn>
</mx:columns>
The dataProvider
is coded:
<mx:GroupingCollection id="matrixProvider" source="{produktMatrix_data.lastResult.result.pos.entry}" childrenField="undefined">
<mx:Grouping>
<mx:GroupingField name="portfolio"/>
<mx:GroupingField name="layer"/>
<mx:GroupingField name="cluster"/>
<mx:GroupingField name="prod_txt"/>
</mx:Grouping>
</mx:GroupingCollection>
But that doesn't populate the AdvancedDataGrid. So, how do I have to tweak my code to make it work? Or should I choose a completely differnt approach?