DataGrid component (Flash Professional only)
The DataGrid component lets you create powerful data-enabled displays and applications. You
can use the DataGrid component to instantiate a recordset (retrieved from a database query in
Macromedia ColdFusion, Java, or .Net) using Macromedia Flash Remoting and display it in
columns. You can also use data from a data set or from an array to fill a DataGrid component.
The version 2 DataGrid component has been improved to include horizontal scrolling, better
event support (including event support for editable cells), enhanced sorting capabilities, and
performance optimizations.
You can resize and customize characteristics such as the font, color, and borders of columns in a
grid. You can use a custom movie clip as a "cell renderer" for any column in a grid. (A cell
renderer displays the contents of a cell.) You can use scroll bars to move through data in a grid;
you can also turn off scroll bars and use the DataGrid methods to create a page view style display.
When you add the DataGrid component to an application, you can use the Accessibility panel to
make the component accessible to screen readers. First, you must add the following line of code to
enable accessibility for the DataGrid component:
mx.accessibility.DataGridAccImpl.enableAccessibility();
You enable accessibility for a component only once, regardless of how many instances you have of
the component. For more information, see Chapter 17, "Creating Accessible Content," in Using
Flash.
Interacting with the DataGrid component (Flash Professional only)
You can use the mouse and the keyboard to interact with a DataGrid component.
If
DataGrid.sortableColumns
clicking in a column header causes the grid to sort based on the column's cell values.
If
DataGrid.resizableColumns
columns.
Clicking in an editable cell sends focus to that cell; clicking a non-editable cell has no effect on
focus. An individual cell is editable when both the
DataGridColumn.editable
When a DataGrid instance has focus either from clicking or tabbing, you can use the following
keys to control it:
Key
Down Arrow
Up Arrow
Right Arrow
and
DataGridColumn.sortOnHeaderRelease
is
, clicking in the area between columns lets you resize
true
properties of the cell are
Description
When a cell is being edited, the insertion point shifts to the end of the
cell's text. If a cell is not editable, the Down Arrow key handles selection
as the List component does.
When a cell is being edited, the insertion point shifts to the beginning of
the cell's text. If a cell is not editable, the Up Arrow key handles selection
as the List component does.
When a cell is being edited, the insertion point shifts one character to the
right. If a cell is not editable, the Right Arrow key does nothing.
Components Dictionary
DataGrid.editable
.
true
DataGrid component (Flash Professional only)
CHAPTER 6
are both
,
true
and
247
Need help?
Do you have a question about the FLASH MX 2004-USING COMPONENTS and is the answer not in the manual?