The following example shows how you can set alternating column background colors on a Flex DataGrid control by setting the backgroundColor style for each DataGridColumn object.
Full code after the jump.
Continue reading ‘Setting background colors on a DataGrid column in Flex’
The following example shows how you can set the text alignment on a Flex DataGrid control’s DataGridColumn by setting the headerStyleName and textAlign styles.
Full code after the jump.
Continue reading ‘Aligning the header text in a DataGrid column in Flex’
The following example shows how you can toggle word wrapping on a Flex DataGrid control’s DataGridColumn by setting the headerWordWrap property.
Full code after the jump.
Continue reading ‘Toggling word wrap on a DataGrid column header 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’
The following example shows how you can set the horizontal scrollbar policy on a Flex DataGrid control by setting the horizontalScrollPolicy property to one of the constants in the mx.core.ScrollPolicy class.
Full code after the jump.
Continue reading ‘Setting the horizontal scrollbar policy on a DataGrid control in Flex’
The following example shows how you can set the header height on a Flex DataGrid control by setting the headerHeight property.
Full code after the jump.
Continue reading ‘Setting the header height on a DataGrid control in Flex’
The following example shows how you can set a custom stretch cursor for a Flex DataGrid with resizable columns by setting the stretchCursor style.
Full code after the jump.
Continue reading ‘Setting a custom stretch cursor on a DataGrid in Flex’
The following example shows how you can use a NumericStepper as an item editor for a Flex DataGrid control by setting the itemEditor and editorDataField properties on the DataGridColumn object.
Full code after the jump.
Continue reading ‘Using a NumericStepper control as an item editor for a DataGrid control in Flex’
The following example shows how you can create an editable Flex DataGrid control by setting the editable property on the DataGrid and DataGridColumn objects.
Full code after the jump.
Continue reading ‘Creating an editable DataGrid control in Flex’
The following example shows how you can use an HSlider control as an item renderer in a Flex DataGrid control.
Full code after the jump.
Continue reading ‘Using a Slider control as a DataGrid column item renderer in Flex’
The following example shows how you can drag an item from a Flex DataGrid control onto an Image control to remove the item from a data provider.
Full code after the jump.
Continue reading ‘Removing items from a Flex DataGrid control using the DragManager class’
The following example shows how you can create a custom sort on a Flex DataGrid control by using the SortField class and creating a custom compare function.
Full code after the jump.
Continue reading ‘Creating a custom 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’
The following example shows how you can set the menu selection mode on a Flex DataGrid control by setting the menuSelectionMode property.
Full code after the jump.
Continue reading ‘Setting the menu selection mode on a DataGrid control 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’