ok. thanks

On 29 Mar 2007 21:49:33 -0700, Alex Harui <[EMAIL PROTECTED]> wrote:

   You can fake the event.

var event:ListEvent = new ListEvent("change");
myGrid.dispatchEvent(event);

If any code is sensitive to the properties in the event you'll have to
fill those in.

 ------------------------------
*From:* [email protected] [mailto:flexcompone
[EMAIL PROTECTED] *On Behalf Of *dorkie dork from dorktown
*Sent:* Thursday, March 29, 2007 7:15 PM
*To:* [email protected]
*Subject:* [flexcomponents]Force a change event programmatically

 Let's say I am trying to force a DataGrid or any component to dispatch a
change event to trigger some listeners. When I do this in code the event is
never trigger. I remember reading about this and some methods you can pass
in an argument to dispatch the event. I realize its a benefit to not
dispatch an event in most situations but I have one that I would like to
dispatch an event. Unfortunately I do not see a default way to dispatch an
events on UIComponents.

// for example how would i trigger an event when selecting the first item
in a grid
myGrid.selectedIndex = 0;


Reply via email to