Skip to content

Instantly share code, notes, and snippets.

@rjattrill
Last active December 14, 2015 22:38
Show Gist options
  • Save rjattrill/5159482 to your computer and use it in GitHub Desktop.
Save rjattrill/5159482 to your computer and use it in GitHub Desktop.
Sort an ArrayCollection
// Sort by taskItemId
var dataSortField:SortField = new SortField();
dataSortField.name = "taskItemId";
dataSortField.numeric = true;
dataSortField.reverse();
var numericDataSort:Sort = new Sort();
numericDataSort.fields = [dataSortField];
this.taskItemAc.sort = numericDataSort;
this.taskItemAc.refresh();
@rjattrill
Copy link
Author

To sort a datagrid by default, sort the AC first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment