You'll get a HEADER_RELEASE event, then I would wait for updateComplete before setting selectedIndex. The sort code wll try to retain the selected item and you need to wait until it has run.
________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Girish Sent: Thursday, December 06, 2007 5:52 AM To: flexcoders Subject: [flexcoders] How to set selected index to 0 when i click on any columnheading to sort the datagrid Hi all When i click on column heading in datagrid, i want to set the 1st item as selected. how can i achieve this. I am filling data in datagrid control and making the first index selected for the first time, my question is when i sort the columns at that time i tried to set the selected index to 0, but it is not selecting the first index, how to set the selected index to 0 when i sort any column in ascending or decending order. always 1st item should be selected in datagrid even when i click on any column heading to sort. Regards Girish ________________________________ Now you can chat without downloading messenger. Click here <http://in.rd.yahoo.com/tagline_webmessenger_5/*http:/in.messenger.yahoo .com/webmessengerpromo.php> to know how.

