The List is simply the view for your data. You need to sort the dataProvider
of the list so when the List is iterating over your data rendering it, it
will be accessing the data in the order specified.

I would pull the data from lastResult, store it in an ArrayCollection or
XMLListCollection(since it seems like you might be using XML), and then you
can set the Sort on the collection as specified in the docs:

http://livedocs.adobe.com/flex/3/langref/mx/collections/Sort.html

Sort also allows you to set a custom compareFunction if you need more than a
simple ascending/descending sort on the dataFields.

On Thu, May 1, 2008 at 10:53 AM, Justin Stanczak <[EMAIL PROTECTED]> wrote:

>   I have the following:
>
>
>  *   <mx:HTTPService id="getMajorsVisitdates" url="ServiceServlet">
>
>
>         <mx:List id="majorsList" width="342"
> dataProvider="{getMajorsVisitdates.lastResult.root.major}"
> change="selectMajor()" height="200" labelField="name" x="10"
> y="36"></mx:List>*
>
>
> How do I sort the majorsList? Seems like it should be easy, but I'm not
> totally understanding how to do it with a List. Thanks.
>
> --
> "All that is necessary for the triumph of evil is that good men do
> nothing." - Edmund Burke
>  
>

Reply via email to