Category Archives: Sort

Displaying the sort arrow in a Flex DataGrid control without having to click a column

I’ve seen this question come up a few times recently in various forums/lists and even in my blog comments (see “Changing the default sort arrow skin on a Flex DataGrid control”).

The following example shows how you can display the sort arrow in a DataGrid control in Flex without having the user click on a column header in the DataGrid control.

Full code after the jump.

Continue reading Displaying the sort arrow in a Flex DataGrid control without having to click a column

Sorting an ArrayCollection using the SortField and Sort classes

Sometimes in life you just need data to be sorted. Whether its a case insensitive sort (for names) or a numeric sort (for, uh, numbers), you just want things sorted in a particular order.

This example demonstrates how you can take a bunch of random numbers in an ArrayCollection and sort them numerically in ascending order.

Continue reading Sorting an ArrayCollection using the SortField and Sort classes