Is myComboValueProperty the id of the combobox(Example -->
<mx:ComboBox id="myComboValueProperty" )? I am having problems getting
to the new value that has been change in the combobox, because the
dataprovider does not get updated automatically. The dataprovider of
the datagrid contains the old value for that column even though the
itmerenderer cb box has changed its value. Thanks




--- In [email protected], "Tracy Spratt" <[EMAIL PROTECTED]> wrote:
>
> Rarely is this the way to go.
> 
>  
> 
> You should go through the dataProvider for all data access.  You should
> use the dataProvider for all renderer UI updates as well.
> 
>  
> 
> Your renderers must be updating the dataProvider items or they wouldn't
> be working.  So do:
> 
> var myComboValue:String = MyDG.selectedItem.myComboValueProperty;
> 
>  
> 
> Tracy
> 
>  
> 
>  
> 
>  
> 
> ________________________________
> 
> From: [email protected] [mailto:[EMAIL PROTECTED] On
> Behalf Of jeffreyr6915
> Sent: Thursday, March 27, 2008 1:44 PM
> To: [email protected]
> Subject: [flexcoders] Actionscript/Flex 3 - Communicating with an
> itemRenderer from the main applicati
> 
>  
> 
> I know that if you want to communicate with the main application from
> within the itemRenderer component, you have to use "outerDocument"
> first...Example:
> 
> <mx: DataGridColumn dataField="field" headerText="col1"
> editorDataField="text" editable="true">
> 
> <mx: itemRenderer>
> <mx: Component>
> <mx:ComboBox dataProvider="{outerDocument.myXml.info}"
> change="myMethod(dg.instanceIndex)" id="cbItemRenderer"/>
> </mx: Component>
> </mx: itemRenderer>
> 
> </mx: DataGridColumn>
> 
> My question is:
> ---How do you communicate with an itemRenderer from within the main
> application? It seems like the main app does not have scope to the
> itemRenderer, because when I add an id attribute to the <mx:ComboBox>
> tag, I cannot refer to it...Example:
> 
> cbItemRenderer.getSelectedItem().label)
> 
> Thanks
>


Reply via email to