You need to "escape" the Component tag. Try this:

outerDocument.handleClick()

This is true for all inline renderers (anything inside the Component  
tag), not just buttons...

cheers, ethan
> Hey guys,
>
> One of the columns in a datagrid uses button as an item renderer.
> Here's the MXML i have:
>
> <mx:DataGridColumn headerText="Foo">
> <mx:itemRenderer>
> <mx:Component>
> <mx:Button label="Test" width="100%" />
> </mx:Component>
> </mx:itemRenderer>    
> </mx:DataGridColumn>
>
> The problem is when I add a "click" event handler to the button, Flex
> Builder does not recognize the function name referenced in the click
> handler. I tried both explicit event handler declaration and using the
> Application.application reference (see below). The function is
> certainly declared, but somehow the usage of it inside of the
> mx:itemRenderer declaration is not recognized.
>
> Tried this:
> <mx:Button label="Test" width="100%" click="handleClick(event)" />
>
> and tried this too:
> <mx:Button label="Test" width="100%"
> click="Application.application.handleClick(event)" />
>
> If anyone has a pointer on how to add a button as a renderer, please
> share the info.
>
> Thanks,
> Mark
>
>
> 

Reply via email to