What happens if you set list.selectedItem = itemJustAdded?



________________________________
From: steveb805 <[email protected]>
To: [email protected]
Sent: Sun, December 13, 2009 5:12:59 PM
Subject: [flexcoders] Re: Selecting an Item Programmatically after Adding it to 
List

  
BTW, "Do I need to resort to:" 
should really say: 
"Do I need to settle for", or something else,  so as not to confuse :)

--- In flexcod...@yahoogro ups.com, "steveb805" <quantumcheesedog@ ...> wrote:
>
> Thought I'd run this by everyone.
> 
> If you have a List, whose dataprovider (arraycollection) has an ac tive sort 
> on it, how do you select a new Item immediately after an addItem call, 
> programtically?
> 
> I can't predict what slot it's going to end up at due to the sort. It used to 
> be easy before the sort (you just select arraycollection. length-1) 
> 
> Do I need to resort to:
>     Using the collectionChange event, and then in the handler function, 
> looking at the object in event.items[ 0], and then searching the 
> arraycollection for the label field?
> 
> Thanks,
> Steve
>


 

Reply via email to