Should just work, but you can try calling invalidateList() (not
invalidateDisplayList()).

 

I'd try it on a List outside of a Repeater.  If that makes a difference,
check the recycling options on Repeater.

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Richard Rodseth
Sent: Wednesday, September 19, 2007 1:29 PM
To: [email protected]
Subject: [flexcoders] Setting selectedIndex

 

I am able to clear the selection of a list programmatically, by setting:

myList.selectedIndex = -1

but setting the selection to a specific index is not working. The
previous highlighting goes away, and based on watching the list in the
debugger, the property does seem to change, but the new selection is
not highlighted. Do I need to invalidate something in addition to just
setting the property?

In case it matters
- the list is inside a component which is repeated in a Repeater.
- there is an item renderer
- the data provider is a custom IList implementation.

But all other use cases (user click, up-down arrows, clearing
selection programmatically) work perfectly.

Thanks.

 

Reply via email to