Field
Identifiers that indicate the names of the columns within the items. This corresponds to
the
columnNames
usually
and
label
In the following code, the fields are
myDP = new Array({name:"Chris", price:"Priceless"}, {name:"Nigel",
price:"Cheap"});
The view consists of three main parts:
Row
This is a view object responsible for rendering the items of the grid by laying out cells.
Each row is laid out horizontally below the previous one.
Column
Columns are fields that are displayed in the grid; the fields each correspond to the
property of each column.
columnName
Each column is a view object (an instance of the DataGridColumn class) responsible for
displaying each column—for example, width, color, size, and so on.
There are three ways to add columns to a data grid: assign a DataProvider object to
DataGrid.dataProvider
item), set
DataGrid.columnNames
constructor for the DataGridColumn class to create columns and call
DataGrid.addColumn()
To format columns, either set up style properties for the entire data grid, or define
DataGridColumn objects, set up their style formats individually, and add them to the
data grid.
Cell
This is a view object responsible for rendering the individual fields of each item. To
communicate with the data grid, these components must implement the CellRenderer
API (see
"CellRenderer API" on page
ActionScript TextField object.
DataGrid parameters
You can set the following authoring parameters for each DataGrid component instance in the
Property inspector or in the Component inspector:
editable
is a Boolean value that indicates whether the grid is editable (
The default value is
false
property in the columns list. In the List component, the fields are
, but in the DataGrid component the fields can be any identifier.
data
name
(this automatically generates a column for each field in the first
to specify which fields are displayed, or use the
to add them to the grid.
109). For a basic data grid, a cell is a built-in
.
Using the DataGrid component (Flash Professional only)
and
:
price
) or not (
).
true
false
253
Need help?
Do you have a question about the FLASH 8-COMPONENTS LANGUAGE and is the answer not in the manual?
Questions and answers