Flash CS4 Professional ActionScript 2.0

DataGrid component

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 Adobe ColdFusion, Java, or .Net) using Adobe 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.

Note: A DataGrid component is supported for both ActionScript 2.0 and ActionScript 3.0. This document discusses the version 2 component. If you are using the version 3 component, see Using the DataGrid in Using ActionScript 3.0 Components.

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. For more information about customization, see DataGridColumn class.

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 the component has. For more information, see "Creating accessible content" in Using Flash.

Related topics