event.target (or currentTarget) returns a reference to the ComboBox, so
you should be able to access any public members, like selectedIndex,
selectedItem, selectedLabel...

 

Tracy

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Barry
Sent: Thursday, December 06, 2007 7:02 AM
To: [email protected]
Subject: [flexcoders] Combo as itemEditor

 

I am using a comboBox component as an itemEditor within a datagrid and
am dispatching an event on a change in the comboBox

dispatchEvent(new DataGridEvent("dgDataChange", true,false,col,field));

I can catch this and send it to a listener function no problem.
However, in the listener function I would like to access the selected
item of the ComboBox.
public function updateMe(event:DataGridEvent):void{

if(event.columnIndex ==0){
//Do something with the data from the comboBox
}else{
//Do Nothing

} }
Does anyone have an idea how to get that data? I see that I can
dispatch a reference to the itemRenderer
DataGridEvent(type:String, bubbles:Boolean = false, cancelable:Boolean
= false, columnIndex:int = -1, dataField:String = null, rowIndex:int =
-1, reason:String = null, itemRenderer:IListItemRenderer = null,
localX:Number)

But am unsure whether it is the way, or how to actually implement it.
Is it a class reference or a reference to a variable?? Hmm... Anyway, if
anyone can help me out, it might save my hair.
Thanks

 

Reply via email to