Hello All,
I am trying to pass the selectedItem from the comboxbox to click event of a button. Both of these components are present inside a datagrid.
A sample of case looks like :
Main.mxml
<mx:DataGrid id="dg1" dataProvider="{initDG}" rowCount="4">
<mx:columns>
<mx:DataGridColumn dataField="Artist"/>
<mx:DataGridColumn dataField="Album" /><mx:DataGridColumn id="test" resizable="true" headerText="Account Options"
itemRenderer="components.comboButton" />
<mx:DataGridColumn dataField="acctOption" headerText="Account Actions"
<mx:itemRenderer>
<mx:Component>
<mx:LinkButton label="Go" click="parentDocument.testing()"/>
</mx:Component>
</mx:itemRenderer>
</mx:DataGridColumn>
</mx:columns>
</mx:DataGrid>
private var initDG:ArrayCollection = new ArrayCollection([
{Artist:'Pavement', Album:'Slanted and Enchanted',
Price:11.99, State:"AL"},
{Artist:'Pavement', Album:'Brighten the Corners',
Price:11.99, State:"AL"}
]);
And comboButton.mxml looks like :
<mx:ComboBox id="comboBox">
<mx:dataProvider>
<mx:Array>
<mx:Object label="one" />
<mx:Object label="two" />
<mx:Object label="three" />
<mx:Object label="four" />
<mx:Object label="five" />
<mx:Object label="six" />
</mx:Array>
</mx:dataProvider>
</mx:ComboBox>
So how can i display the value of the selectedItem, when the user selectes of the values from comboxbox and clicks the "Go" button.
I want to somehow show that value in my function called "testing()"
Please advise.
Thank you