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 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’
The following example shows how you can perform numeric sorts, case sensitive sorts, or case insensitive sorts in the Flex DataGrid control by setting a custom sort compare function on the DataGridColumn using the sortCompareFunction property, the static ObjectUtil.numericCompare() method, and the static ObjectUtil.stringCompare() method.
Full code after the jump.
Continue reading ‘Performing case [in]sensitive sorts using the DataGrid control in Flex’
The following example shows how you can set the background alpha and background color of a Flex DataGrid control by setting the backgroundAlpha and backgroundColor styles.
Full code after the jump.
Continue reading ‘Setting the background alpha and background color of a DataGrid control in Flex’
The following example shows how you can dynamically add new columns to a Flex DataGrid control by setting the columns property.
Full code after the jump.
Continue reading ‘Dynamically adding new columns to a DataGrid control in Flex’
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’
The following example shows how you can change the sort arrow skin on a DataGrid control in Flex by setting the sortArrowSkin style.
Full code after the jump.
Continue reading ‘Changing the default sort arrow skin on a Flex DataGrid control’