User Guide
284 DataGrid component (Flash Professional only)
Usage
myDataGrid.editable
Description
Property; determines whether the data grid can be edited by a user (true) or not (false).
This property must be
true in order for individual columns to be editable and for any cell to
receive focus. The default value is
false.
If you want individual columns to be uneditable, use the
DataGridColumn.editable
property.
Example
The following example allows users to edit all the columns of the grid except the first column.
With a DataGrid instance named
my_dg on the Stage, paste the following code in the first
frame of the main timeline:
my_dg.setSize(140, 100);
// Add columns to grid and add data.
my_dg.addColumn("a");
my_dg.addColumn("b");
my_dg.addItem({a:"one", b:1});
my_dg.addItem({a:"two", b:2});
// Make DataGrid editable.
my_dg.editable = true;
// Make the first column read-only.
my_dg.getColumnAt(0).editable = false;
See also
DataGridColumn.editable
CAUTION
The DataGrid is not editable or sortable if it is bound directly to a WebServiceConnector
component or an XMLConnector component. You must bind the DataGrid component
to the DataSet component and bind the DataSet component to the
WebServiceConnector component or XMLConnector component if you want the grid to
be editable or sortable. For more information, see Chapter 16, “Data Integration (Flash
Professional Only),” in Using Flash.