Getting Your ItemRenderer to Behave With The DataGrid

The columns that used my ItemRenderer weren't responding to the 'itemClick' event that was set on the DataGrid (but the columns that weren't using the ItemRenderer WERE responding to it).

So I added this code to my Itemrenderer...

//in the constructor I put this....
this.addEventListener(ListEvent.ITEM_CLICK,handleClick);

//and here's the handler that I added...
private function handleClick(evt:ListEvent):void{
dispatchEvent(evt);
}

I wouldn't be surprised if there is some simple property to set that can overcome this, and I hate add event listeners if I don't have to. So, if anyone out there has some advice, please post a comment.

RECENT ARTICLES