Customizing The Datagrid Component (Flash Professional Only) - MACROMEDIA FLASH 8-COMPONENTS LANGUAGE Reference

Components language reference
Table of Contents

Advertisement

Separate data processing from CellRenderer processing.
The CellRenderer API lets you display custom cell content in a data grid. A functional
requirement might require that you populate the data grid with a ComboBox component
or other UI control conditionally. For example, based on a selection in column two, you
may repopulate or auto-select options in column four. Whenever possible, it is important
to separate this conditional logic and repopulating of controls from the process of
rendering the content of the cell. Each time the mouse rolls over the cell, the cell is
selected, or data is changed, the content of the cell or the entire cell is likely to be redrawn
to keep it up to date. This means that any code you put in CellRenderer is run over and
over again, so you should keep processing in CellRenderer as light as possible. If you do
have to add code to CellRenderer, it is better to call a function from CellRenderer that
detects what updates need to be made and makes them in the most efficient manner.
Use
UIObject.doLater()
A data grid instance needs to finish drawing and loading data before you can access all the
properties of the data grid (such as
"complete" event for a DataGrid, you can use
function that accesses the data grid properties.
function only after the data grid properties are available. See
an example.
Customizing the DataGrid component
(Flash Professional only)
You can transform a DataGrid component horizontally and vertically during authoring and
runtime. While authoring, select the component on the Stage and use the Free Transform tool
or any of the Modify > Transform commands. At runtime, use the
UIObject.setSize()
proportionally. If column (and therefore, cell) size adjustment occurs, text in the cells may
be clipped.
258
DataGrid component (Flash Professional only)
to access properties after the data grid has finished drawing.
focusedCell
). If there is no horizontal scroll bar, column widths adjust
and others). Because there is no
UIObject.doLater()
UIObject.doLater()
DataGrid.focusedCell
setSize()
, instead, to call a
will execute the
for
method (see

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