how do i change the item selected in a combobox selection based on a selection of a datagrid object?
A:
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}"/>
Treur
2010-06-14 10:20:59
but i want only a paricular feild from the datagrid to be selected
ruchir patwa
2010-06-14 10:25:23
I don't quite understand. Perhaps you could provide a more elaborate description of your use-case?
Treur
2010-06-14 11:11:25
selectedItem = "{dg.selectedItem['particularField']}"
Richard Haven
2010-06-15 05:29:38
A:
use the itemClick event on the datagrid to change the selection of the combo box. You can find similar answer here http://stackoverflow.com/questions/972334/itemclick-event-in-datagrid
redben
2010-06-14 10:21:22
it works for a text field but can you tell me how to implement it in a combo box?pls
ruchir patwa
2010-06-14 10:28:37
I'd recommend using ListEvent.CHANGE event instead. ItemClick doesn't cover all methods of selection on the DataGrid/List, since the user can change selection via Keyboard.
bug-a-lot
2010-06-15 11:23:08