User Guide
254 Chapter 6: Components Dictionary
target.setStyle(style, source.getStyle(style));
}
For more information about class-level styles, see “Setting styles for a component class”
on page 71.
Using skins with the DataGrid component
The skins that the DataGrid component uses to represent its visual states are included in the
subcomponents that constitute the data grid (scroll bars and RectBorder). For information about
their skins, see “Using skins with the UIScrollBar component” on page 831 and “RectBorder
class” on page 647.
DataGrid class (Flash Professional only)
Inheritance MovieClip > UIObject class > UIComponent class > View > ScrollView >
ScrollSelectList > List component > DataGrid
ActionScript Class Name mx.controls.DataGrid
Each component class has a
version property, which is a class property. Class properties are
available only on the class itself. The
version property returns a string that indicates the version
of the component. To access this property, use the following code:
trace(mx.controls.DataGrid.version);
Note: The code
trace(myDataGridInstance.version); returns undefined.
Method summary for the DataGrid class
The following table lists methods of the DataGrid class.
Method Description
DataGrid.addColumn() Adds a column to the data grid.
DataGrid.addColumnAt() Adds a column to the data grid at a specified location.
DataGrid.addItem() Adds an item to the data grid.
DataGrid.addItemAt() Adds an item to the data grid at a specified location.
DataGrid.editField() Replaces the cell data at a specified location.
DataGrid.getColumnAt() Gets a reference to a column at a specified location.
DataGrid.getColumnIndex() Gets a reference to the DataGridColumn object at the specified
index.
DataGrid.removeAllColumns() Removes all columns from a data grid.
DataGrid.removeColumnAt() Removes a column from a data grid at a specified location.
DataGrid.replaceItemAt() Replaces an item at a specified location with another item.
DataGrid.spaceColumnsEqually() Spaces all columns equally.