0

I have an ExtendedAdvancedDataGrid with a column which has toggle buttons in it (here is a snippet of the mxml code):

<columns:ExtendedAdvancedDataGridColumn id="toggle" sortable="false" editable="false" headerText="Sort" dataField="include_order" columnWidthMode="fixed" width="60">
    <columns:itemRenderer>
        <fx:Component>
            <mx:VBox verticalAlign="middle" horizontalAlign="center">
                <s:ToggleButton id="sortToggle" label="OFF" width="55" color="white" chromeColor="red"  selected="false" click="outerDocument.sortToggle_click(event)"/>
            </mx:VBox>
        </fx:Component>
    </columns:itemRenderer>
</columns:ExtendedAdvancedDataGridColumn>

When the user clicks one of the buttons, it calls function sortToggle_click(). I want that function to be able to access the label of the SECOND button in the list not matter which button was clicked. How do I access that particular button label in the function?

Thanks.

user1916817
  • 73
  • 1
  • 8
  • Are you using a dataprovider? – James Jan 09 '13 at 11:13
  • Yes, the field in the dataProvider for that column is include_order – user1916817 Jan 09 '13 at 14:53
  • I would populate the label of the button using your underlying dataProvider and some logic within the itemRenderer. That way, when a button is clicked you can read the label from the dataProvider rather than the component. – James Jan 09 '13 at 16:00

0 Answers0