Instead of trying to simulate an itemClick, why not put all of the change event actions into a separate function, and call that from both the change handler and from the programattic selection function?
Tracy ________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Guilherme Blanco Sent: Monday, September 15, 2008 4:30 PM To: [email protected] Subject: [flexcoders] Dispatching AdvancedDataGrid change event by hand Hi all, I'm implementing an automate way to select items by passing the id of rows. The idea is to simple do: <root> <item id="1" ..../> </root> this.selectedId = 1; And it'll select the item that has id = 1. I get everything working as expected, except of events triggering. When I do a simple this.selectedIndex = i; If changes the selected row as I want to, but does not trigger the change event. So I need to manually trigger this event (since I have actions related to this event). How to I manually call this event? I did this for a ComboBox, which had the same issue too... I did that by doing: this.dispatchEvent(new ListEvent.CHANGE, false, false, 0, i)); But now the component is AdvancedDataGrid. By answering the first question, I also want to ask about how do I do the same event for multiple rows selection (when allowMultipleSelection = true). Thanks in advance, Best regards, -- Guilherme Blanco - Web Developer CBC - Certified Bindows Consultant Cell Phone: +55 (16) 9166-6902 MSN: [EMAIL PROTECTED] <mailto:guilhermeblanco%40hotmail.com> URL: http://blog.bisna.com <http://blog.bisna.com> Rio de Janeiro - RJ/Brazil

