Tag Archive for 'refresh()'

14
May

Determining when an ArrayCollection changes in Flex

The following example shows how you can detect when a Flex ArrayCollection has changed (items added, removed, refreshed) by listening for the collectionChange event.

Full code after the jump.

Continue reading ‘Determining when an ArrayCollection changes in Flex’

08
Apr

Resetting a sort on a DataGrid control in Flex

The following example shows how you can reset a sort on a Flex DataGrid control by setting the ArrayCollection data provider’s sort property to null and refreshing the array collection using the refresh() method.

Full code after the jump.

Continue reading ‘Resetting a sort on a DataGrid control in Flex’

12
Mar

Using a CheckBox to filter items in a DataGrid in Flex

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

Full code after the jump.

Continue reading ‘Using a CheckBox to filter items in a DataGrid in Flex’

05
Aug

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.

Full code after the jump.

Continue reading ‘Sorting an ArrayCollection using the SortField and Sort classes’