Skip to content

Instantly share code, notes, and snippets.

@rjattrill
Last active December 28, 2015 07:09
Show Gist options
  • Save rjattrill/7462367 to your computer and use it in GitHub Desktop.
Save rjattrill/7462367 to your computer and use it in GitHub Desktop.
Sort a Flex ArrayCollection. Note, to programmatically sort values in a Spark DataGrid, one way is to sort the dataProvider - which is usually an ArrayCollection. (Another way is to use the sortbyColumns() method on some event.)
var dataSortField:SortField = new SortField();
dataSortField.name = "activity";
dataSortField.numeric = false;
var sort:Sort = new Sort();
sort.fields = [dataSortField];
this.taskAc.sort;
this.taskAc.refresh();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment