User Guide
278 Chapter 6: Components Dictionary
DataGrid.spaceColumnsEqually()
Availability
Flash Player 6 (6.0 79.0).
Edition
Flash MX Professional 2004.
Usage
myDataGrid.spaceColumnsEqually()
Parameters
None.
Returns
Nothing.
Description
Method; respaces the columns equally.
Example
The following example respaces the columns of myGrid when any column header is pressed
and released:
myGrid.showHeaders = true
myGrid.dataProvider = [{guitar:"Flying V", name:"maggot"}, {guitar:"SG",
name:"dreschie"}, {guitar:"jagstang", name:"vitapup"}];
gridLO = new Object();
gridLO.headerRelease = function(){
myGrid.spaceColumnsEqually();
}
myGrid.addEventListener("headerRelease", gridLO);
DataGridColumn class (Flash Professional only)
ActionScript Class Name mx.controls.gridclasses.DataGridColumn
You can create and configure DataGridColumn objects to use as columns of a data grid. Many of
the methods of the DataGrid class are dedicated to managing DataGridColumn objects.
DataGridColumn objects are stored in an zero-based array in the data grid; 0 is the leftmost
column. After columns have been added or created, you can access them by calling
DataGrid.getColumnAt(index).
There are three ways to add or create columns in a grid. If you want to configure your columns, it
is best to use either the second or third way before you add data to a data grid so you don’t have to
create columns twice.
• Adding a data provider or an item with multiple fields to a grid that has no configured
DataGridColumn objects automatically generates columns for every field in the reverse order
of the
for..in loop.