Posts Tagged: itemrenderer


5
Oct 08

Search dataGrid and Simple dataGrid Itemrenderer example

The following example is a Simple searchable DataGrid, I have also included dataGrid item renderer to show how to define/use a dataGrid “itemRendrer”. Search and Highlight a row depending on the searched text in a dataGrid. Define a cursor to traverse dataGrid rows.

The Objective of this example :

  • How to create custom item rendrer using Updatedisplaylist and data property.
  • How to use the itemrendrer (detail).
  • How to use custom cursors in a dataGrid.
  • how to write a custom component extending a base component in this case dataGrid. (highlight a row in the dataGrid).

Download source:

Sample : search_datagrid

Share:
  • DZone
  • Digg
  • Twitter
  • Google Bookmarks
  • Technorati
  • StumbleUpon
  • MySpace
  • Sphinn
  • del.icio.us
  • Facebook
  • Reddit
  • Mixx

8
Sep 08

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 >
<mxnerdutton label=”Remove” click=”outerDocument.remove()“/>
</mx:VBox>
</mx:Component>
</mx:itemRenderer>

Share:
  • DZone
  • Digg
  • Twitter
  • Google Bookmarks
  • Technorati
  • StumbleUpon
  • MySpace
  • Sphinn
  • del.icio.us
  • Facebook
  • Reddit
  • Mixx