change combobox selection based on value in an object in flex
how do i change the item s开发者_JAVA技巧elected in a combobox selection based on a selection of a datagrid object?
Just bind the selectedItem property of the combobox to the dataGrid:
<s:ComboBox
id="combo"
dataProvider="{data}"
selectedItem="{dg.selectedItem}" />
<mx:DataGrid
id="dg"
dataProvider="{data}"/>
use the itemClick event on the datagrid to change the selection of the combo box. You can find similar answer here Itemclick event in datagrid
精彩评论