Yes, ListCollectionView is written to retrieve all data before it
executes the sort because the Sort object expects to sort everything at
once.  You could write your own ICollectionView and just not actually
call Sort.sort()and do your own thing (look at the SortFields within the
sort when refresh() is called and then adjust your custom IList as
appropriate).

Matt

-----Original Message-----
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Dion Mendel
Sent: Monday, January 09, 2006 9:55 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flex 2.0 Remote database sorting

Hi All,

I have a database with a large list of records that I want to access
from Flex.  I wrote a custom class based on mx.collections.IList that
retrieves the data in pages, handles caching and recycling of old items.
Everything works fine so far.  I've used a technique similar to Matt
Chotin on his blog, but this works with Flex 2.0.

Now I want to implement sorting on the Database.  Flex 1.5 had a
convenient mx.controls.listclasses.DataProvider class, which
unfortunately isn't in Flex 2.0.

What is the recommended way to implement remote sorting?  Loading all
data into memory and using ActionScript for sorting is not an option.

I've tried wrapping a ListCollectionView around my custom IList with
the aim of later providing a custom Sort class.  This introduces it's
own problems - the ListCollectionView wants to iterate over the entire
list, which is a pain with large lists.

Do I have to implement my own custom ICollectionView, IViewCursor, and
extend Sort to achieve this?  I can't see an easier way at the moment.

Thanks for any advice,
Dion.




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links



 




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to