<mx:DataGrid id="dg"
                <mx:columns>
                                <mx:DataGridColumn>
                                                <mx:itemRenderer>
                                                                <mx:Component>
                                                                                
From in here, outerDocument.dg is the DataGrid for this inline renderer

You can also use "owner" in most cases

Alex Harui
Flex SDK Developer
Adobe Systems Inc.<http://www.adobe.com/>
Blog: http://blogs.adobe.com/aharui

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of aceoohay
Sent: Sunday, February 22, 2009 1:08 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] properties and methods of a datagrid from item renderer


How do you access the properties and methods of a datagrid from an an
item renderer/inline component?

I have a component that is called from multiple datagrids. In certain
cases I need to call a routine that manipulates the datagrid, whichever
one has the item renderer in it.

I need to access the selectedIndex, and the dataprovider to pass to the
outerDocument routine that I call. How can you reference grid from
whence you came?

Paul

Reply via email to