Adobe Flex Datagrid: addEventListener MouseEvent.CLICK
- by JonoB
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);