If the things you are adding are not in sort order, then you no longer
really want the collection to be sorted.  You could use a concatenated
collection to join the new items while the others remain sorted like I
did in this post:
http://blogs.adobe.com/aharui/2008/03/custom_ilists_combobox_prompts.htm
l

 

Or you can simply grab the old dataprovider via toArray() into a new
collection without a sort and add your new items at the beginning.

 

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of superabe superabe
Sent: Tuesday, May 27, 2008 5:08 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] add item to the top of a sorted datagrid

 

Is there any way to add new items to the top of a sorted datagrid? 
I know how to add stuff to a datagrid/provider, but am unsure about how
to keep the new item at the top of the datagrid and not have the
underlying sort kick-in.

TIA
- superabe

 

Reply via email to