Hi, I have an advanced data grid with hierarchical data, displayed in
tree view.
Selecting a cell updates a pie chart to show the breakdown for the
node, by passing to a modelLocator value:
model.expenditure.selectedItem = e.itemRenderer.data as CategoryObject;
which the pie is bound to.

This is straightforward enough, but I also need it to work in the
other direction, so that if the pie segment is drilled-down into, the
selected cell in the ADG is changed. (The pie click updates the
model.expenditure.selectedItem). However, I don't know how to go about
finding this cell!
How can I loop through the ADG's elements to find the co-ordinates for
the cell to select??

I really hope you can help, this is driving me crazy!

<mx:AdvancedDataGrid
        designViewDataType="tree" 
        dataProvider="{new 
HierarchicalData(rptAccordions.currentItem.children)}"
        showHeaders="false" width="100%" selectable="true"
selectionMode="singleCell"
        variableRowHeight="true"
        creationComplete="addToDisplayItemArray(event)" 
        itemOpening="openTreeItem(event)" itemClose="closeTreeItem(event)" 
        change="selectItem(event)" >
        <mx:columns>
                <mx:AdvancedDataGridColumn dataField="name" width="202" />
                <mx:AdvancedDataGridColumn labelFunction="getClientAmount"
width="108" />
                <mx:AdvancedDataGridColumn labelFunction="getPartnerAmount"
width="108" />
                <mx:AdvancedDataGridColumn labelFunction="getJointAmount" 
width="108" />
                <mx:AdvancedDataGridColumn labelFunction="getCombinedAmount" />
        </mx:columns>
</mx:AdvancedDataGrid>

Reply via email to