In your item renderer, if you have control over the TimerEvent creation, set the "bubbles" parameter to true. If you do not, you may want to catch the event in the renderer and re-dispatch a new one with bubbles set to true. This will allow your event to bubble out, up the parental chain until it reaches your application. Then all you need to do is register for the event at the Application level.

hth
Scott

---
Scott Melby
Founder, Fast Lane Software LLC
http://www.fastlanesw.com


jitendra jain wrote:
Where is the Timer control ? Which TimerEvent you are listening to ..
Thanks,

with Regards,
Jitendra Jain



*From:* Sébastien Tromp <sebastien.tromp@ gmail..com>
*To:* [EMAIL PROTECTED] ups.com
*Sent:* Saturday, 18 October, 2008 3:48:39 PM
*Subject:* [flexcoders] Listem to an event sent by a DataGrid ItemRenderer

Hello,

I am stuck with an issue whose solution I cannot find on the Internet.

I have an application with a DataGrid:

<mx:DataGrid id="currentConstruc tions">
<mx:columns>
<mx:DataGridColumn dataField="building Type"/>
<mx:DataGridColumn dataField="endDate" id="remainingTime"
itemRenderer= "org.feilun. renderer. CountDownRendere r" />
</mx:columns>
</mx:DataGrid>

where CountDownRenderer is a custom ItemRenderer that can dispatch a
TimerEvent.TIMER_ COMPLETE event.

I would like to listen in my main application (where the DataGrid is
defined) to this TIMER_COMPLETE event, but I have not managed to do it.

I have tried things like:
currentConstruction s.addEventListen er(TimerEvent. TIMER_COMPLETE,
handleTimerComplete );
or
remainingTime. addEventListener (TimerEvent. TIMER_COMPLETE,
handleTimerComplete );

but in neither case is the event caught.

Do you have any idea on how this could be achieved?

Thanks a lot,
Sébastien


Send free SMS to your Friends on Mobile from your Yahoo! Messenger. Download Now! http://messenger. yahoo.com/ download. php

Reply via email to