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:[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;