Adobe Flex Datagrid: addEventListener MouseEvent.CLICK

Posted by JonoB on Stack Overflow See other posts from Stack Overflow or by JonoB
Published on 2010-05-02T17:19:31Z Indexed on 2010/05/02 17:27 UTC
Read the original article Hit count: 699

Filed under:
|
|

I have a datagrid with a custom label itemrenderer (basically it makes the label look like a traditional html hyperlink).

<mx:DataGridColumn id="itemId">  
  <mx:itemRenderer>
    <mx:Component>
      <controls3:HyperlinkLabel text="{data.doc}" />
    </mx:Component>
  </mx:itemRenderer>   
</mx:DataGridColumn> 

The above works perfectly.

I'd like to try add an event listener to this itemrenderer, but I'm not sure how to do this given that I cant specify an id for the itemrendered itself.

I tried the following, but it doesnt seem to work:

itemId.addEventListener(MouseEvent.CLICK, onItemSelect);

© Stack Overflow or respective owner

Related posts about flex

Related posts about datagrid