Use ItemRenderer for Display and itemEditor for Edit.
If you make the Grid editable you have what you want
<mx:DataGridColumn headerText="Description" dataField="Description">
<mx:itemEditor>
<mx:Component>
<mx:ComboBox width="100%" />
</mx:Component>
</mx:itemEditor>
<mx:itemRenderer>
<mx:Component>
<mx:Label text = "data.Text"/>
</mx:Component>
</mx:itemRenderer>
</mx:DataGridColumn>
________________________________
Von: [email protected] [EMAIL PROTECTED] im Auftrag von Fidel Viegas
[EMAIL PROTECTED]
Gesendet: Dienstag, 29. April 2008 09:35
An: [email protected]
Betreff: [flexcoders] DataGrid custom itemRenderer using a ComboBox
Hi All,
I am trying to implement a DataGrid with one of the columns as a
ComboBox. The thing is that I want to show a label with an icon when
the column is in a normal (non editable state), and show the combo box
when the user clicks the column to edit it.
Does anyone have an example or some tips on how to achieve this?
Thanks in advance,
Fidel.