Tag Archives: refresh()

Using a Slider to filter items in a DataGrid control in Flex

In a previous example, “Using a CheckBox to filter items in a DataGrid in Flex”, we saw how to filter the items in a Flex DataGrid control based on whether the user selected a CheckBox control or not.

The following example shows how you can filter items in a Flex DataGrid control using an HSlider control, and the ArrayCollection class’s filterFunction property.

Full code after the jump.

Continue reading Using a Slider to filter items in a DataGrid control in Flex

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