RE: [flexcoders] add item to the top of a sorted datagrid

2008-05-27 Thread Alex Harui
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

 



Re: [flexcoders] add item to the top of a sorted datagrid

2008-05-28 Thread superabe superabe
Thanks. I'll give those a try.

- superabe

On Wed, May 28, 2008 at 1:22 AM, Alex Harui <[EMAIL PROTECTED]> wrote:

>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.html
>
>
>
> 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
>
>  
>