Hi, I am developing an application in Flex 3. I want to access a function of the main application from the item renderer component. I was trying to use the outerDocument property of Flex, but it is not recognizing it. How can I access this property? Also how can i use the ParentDocument property here?
Code I have written - <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="myService.send()"> <mx:HTTPService id="myService" url="myXML.xml" result="getResult(event)" /> <mx:Script> <![CDATA[ import mx.collections.ArrayCollection; import mx.rpc.events.ResultEvent; import mx.controls.Alert; [Bindable] private var myArrColl:ArrayCollection; private function getResult(event:ResultEvent):void { myArrColl = event.result.Adobe.Product; } public function someFunction():void { Alert.show('Hello'); } ]]> </mx:Script> <mx:Canvas> <mx:DataGrid id="myDG" dataProvider="{myArrColl}"> <mx:columns> <mx:DataGridColumn headerText="Product Names"> <mx:itemRenderer> <mx:Component> <mx:Button label="{data.Name}" click="outerDocument.someFunction ()" /> </mx:Component> </mx:itemRenderer> </mx:DataGridColumn> </mx:columns> </mx:DataGrid> </mx:Canvas> </mx:Application> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Flex India Community" group. To post to this group, send email to flex_india@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/flex_india?hl=en -~----------~----~----~----~------~----~------~--~---