User Guide

260 Chapter 6: Components Dictionary
Returns
A reference to the DataGridColumn object that was added.
Description
Method; adds a new column to the end of the data grid. For more information, see
“DataGridColumn class (Flash Professional only)” on page 278.
Example
The following code adds a new DataGridColumn object named Purple:
import mx.controls.gridclasses.DataGridColumn;
myGrid.addColumn(new DataGridColumn("Purple"));
DataGrid.addColumnAt()
Availability
Flash Player 6 (6.0 79.0).
Edition
Flash MX Professional 2004.
Usage
myDataGrid.addColumnAt(index, name)
myDataGrid.addColumnAt(index, dataGridColumn)
Parameters
index
The index position at which the DataGridColumn object is added. The first
position is 0.
name A string that indicates the name of the DataGridColumn object.
dataGridColumn An instance of the DataGridColumn class.
Returns
A reference to the DataGridColumn object that was added.
Description
Method; adds a new column at the specified position. Columns are shifted to the right and their
indexes are incremented. For more information, see “DataGridColumn class (Flash Professional
only)” on page 278.
Example
The following example inserts a new DataGridColumn object called "Green" at the second and
fourth columns:
import mx.controls.gridclasses.DataGridColumn;
myGrid.addColumnAt(1, "Green");
myGrid.addColumnAt(3, new DataGridColumn("Purple"));