I've currently go this issue too, but I have the following:

<mx:DataGridColumn width="75"   headerText="Header
itemRenderer="itemRenderers.columnRenderer"/>

And thus have a folder called itemRenderers with a MXML Component
columnRenderer. From this component how do a call a function in the
main part where the datagrid is?

I have tried outerDocument but Flex Builder shows an error.

All the MXML Component has is:

<mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml"; 
horizontalScrollPolicy="off" verticalScrollPolicy="off">
        <mx:Text text="{data.columnData}" fontSize="10" width="100%"
height="100%" textAlign="center" click="outerDocument.appFunction()"/>
</mx:VBox>

I get two errors:

1180: Call to a possibly undefined method appFunction. columnRenderer.mxml
1120: Access of undefined property outerDocument. columnRenderer.mxml

All Help Appreciated

Kev.


--- In [email protected], "Gordon Smith" <[EMAIL PROTECTED]> wrote:
>
> That's not a function call, and if enter="myfunction()" doesn't
compile then enter="myfunction" shouldn't either.
>  
> If myfunction() is a method of the component or application that
contains the DataGrid, then you want
enter="outerDocument.myfunction()". Without outerDocument, you're
calling a method on the <mx:Component> that defines the item renderer.
>  
> - Gordon


Reply via email to