Data Model Flex



    
        
            import mx.collections.SortField;
            import mx.collections.Sort;
            import mx.collections.ArrayCollection;
            
            [Bindable]
            public var myCollection:ArrayCollection = new ArrayCollection
            (
                [
                    {label: "A"},
                    {label: "B"},
                    {label: "C"},
                    {label: "D"},
                    {label: "E"}
                ]
            );
            
            public function sortCollection():void
            {
                var sort:Sort = new Sort();
                sort.fields = [new SortField("label", true, true)];
                myCollection.sort = sort;
                myCollection.refresh();
            }