Datagrid.additem() - MACROMEDIA FLASH 8-COMPONENTS LANGUAGE Reference

Components language reference
Table of Contents

Advertisement

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
300.
Example
This example shows two ways to use
and sets the column widths. With a
addColumnAt()
DataGrid instance named
on the Stage, paste the following code in the first frame of
my_dg
the main timeline (notice that it imports the DataGridColumn class first):
import mx.controls.gridclasses.DataGridColumn;
var my_dg:mx.controls.DataGrid;
my_dg.setSize(320, 240);
// Add columns to grid.
my_dg.addColumnAt(0, "Orange");
var orange_dgc:DataGridColumn = my_dg.getColumnAt(0);
orange_dgc.width = 125;
var blue_dgc:DataGridColumn = new DataGridColumn("Blue");
blue_dgc.width = 75;
my_dg.addColumnAt(1, blue_dgc);

DataGrid.addItem()

Availability
Flash Player 6 (6.0.79.0).
Edition
Flash MX Professional 2004.
Usage
myDataGrid.addItem(item)
Parameters
An instance of an object to be added to the grid.
item
Returns
A reference to the instance that was added.
270
DataGrid component (Flash Professional only)

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-COMPONENTS LANGUAGE and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Flash 8

Table of Contents