Following is the snippet of my code to embedd a combo box in a dataGrid. Is there a better way to do this?
Thanks
Bruce
<mx:itemRenderer>
<mx:Component>
<mx:Canvas>
<mx:Script>
<![CDATA[
override public
function set data(data:Object) : void {
if
(data != null) myComboBox.text = cbData.(@data ==
data.per)[EMAIL PROTECTED];
}
private function handleClose( event :
Event)
: void {
trace('The per Value is ' +
cbData.(@label
== event.target.selectedLabel)[EMAIL PROTECTED]);
}
]]>
</mx:Script>
<mx:XMLList id="cbData">
<menu label="E"
data="1" />
<menu label="X"
data="10" />
<menu label="D"
data="12" />
<menu label="C"
data="100" />
<menu label="M"
data="1000" />
</mx:XMLList>
<mx:ComboBox id="myComboBox"
dataProvider="{cbData}" labelField="@label" close="handleClose( event )"/>
</mx:Canvas>
</mx:Component>
</mx:itemRenderer>

