I am trying to sort a list of string stored in an arraycollection. But the sorted result is not correct. Please see my code.
spark.collections.Sort
if(value is ArrayCollection){
var sort:Sort=new Sort();
var sortField:SortField = new SortField("data")
sortField.numeric=false;
sort.fields=[sortField];
ArrayCollection(value).sort=sort;
ArrayCollection(value).refresh();
}
Input: Start With, Contains, End With, Equals IgnoreCase, Not Equals, Matching, Equals
Output: Equals IgnoreCase, Contains, End With, Start With, Not Equals, Matching, Equals
Some time only one row is swapping with another(as above), some time no sorting at all.
In case of your array collection having list of string. you need not specify name of SortField your case
data
.o/p:
If arraycollection having object with data property your code is absolutly correct. like
This case you need to specify like