0
votes

I'm trying to intercept an event dispatched by my custom renderer in this way:

this.owner.dispatchEvent(new ResultEvent("eventName",true,false,parameter));

Here is my grid:

<mx:DataGrid id="calendarGrid">
        <mx:columns>
          <mx:DataGridColumn headerText="header"
                             id="h"
                             sortable="false"
                             itemRenderer="myRenderer"/>
        </mx:columns>
</mx:DataGrid>

and here is how I add eventlistener to my grid:

calendarGrid.addEventListener("eventName", handlerFunction);

handlerFunction is never called. Please help...

SORRY MY FAULT... addEventListener was in the creationComplete function which (I don't know why) never fires. Now it works!

1
Does calendarGrid ever dispatch the "eventName" event? What event are you listening for? - Jason Towne
Looks like you answered your own question. You should add this as an answer and mark it answered so others will benefit from your solution. - Wade Mueller

1 Answers

0
votes

SORRY MY FAULT... addEventListener was in the creationComplete function wich (I don't know why) never fires. Now works!