This content has been marked as final. Show 4 replies
I'd probably start approaching that as a tree control with a custom item renderer. The itemRenderer having a datagrid in it.
Thanks for your advice. Since I'm new to Flex, can you give me a little more detail of how to do the custom item renderer? Greatly appreciated.
1) Create an MXML component which will be used to render each item in the tree (I usually base these components on HBox or VBox depending on how I expect to layout my component).
2) Within that mxml file, you can reference row data using the "data" keyword
3) You design this mxml file so that it can display either type of view you want (grid vs sub-grid) based on the isBranch property on the component's data property.
4) You set the itemRenderer property of the <mx:Tree> control on your page equal to the name of the mxml file created above.
Once that's done, you pass hierarchical data to the tree via the dataProvider property, and voila.