How do I add a combo box to a DataGrid?

Posted by FigBug on Stack Overflow See other posts from Stack Overflow or by FigBug
Published on 2010-04-01T02:10:34Z Indexed on 2010/04/01 2:13 UTC
Read the original article Hit count: 371

Filed under:
|
|
|

I want to add a ComboBox to a DataGrid. So far, the only way I've found to do it is like this:

<mx:DataGridColumn headerText="Header" dataField="src" >
<mx:itemRenderer>
<mx:Component>
<mx:ComboBox dataProvider="{data.srcChoices}" />
</mx:Component>                                             
</mx:itemRenderer>
</mx:DataGridColumn>

The problem is the initial value of the ComboBox isn't set correctly. If I hard code the choices, then the initial value is set correctly. I can't hard code the choices. Any idea what I should do?

© Stack Overflow or respective owner

Related posts about flex

Related posts about combobox