Inline Itemrenderer

I stumbled upon an unknown property as I was trying to use an Inline Item Renderer on my DataGrid Columns. If you use the <mx:component> tag with your inline item renderer and try to have your component call an event in your main application you will get a nasty “Access to undefined method ……”. This is because your Inline Item Renderer is unaware of what exists in your main application. But you can use the outerDocument property to access event handlers in you main application.

Example:
<mx:itemRenderer>
<mx:Component>
<mx:VBox >
<mx:Button label=”Remove” click=”outerDocument.remove()“/>
</mx:VBox>
</mx:Component>
</mx:itemRenderer>

Related posts:

  1. Copy functionality in DataGrid
  2. Search dataGrid and Simple dataGrid Itemrenderer example
  3. Flex dataGrid default column sort
  4. Filter datagrid using a hslider
  5. Dynamically add remove columns in a datagrid

Tags: , ,

One comment

  1. thanx,
    that helped me a lot.

Leave a comment