User Guide
DataGridColumn.labelFunction 307
Example
The following example sets the column header text to “Price (USD)”:
import mx.controls.gridclasses.DataGridColumn;
var my_dg:mx.controls.DataGrid;
var price_dgc:DataGridColumn = new DataGridColumn("price");
price_dgc.headerText = "Price (USD)";
price_dgc.width = 80;
my_dg.addColumn(price_dgc);
my_dg.addItem({price:"$14.99"});
DataGridColumn.labelFunction
Availability
Flash Player 6 (6.0.79.0).
Edition
Flash MX Professional 2004.
Usage
myDataGrid.getColumnAt(index).labelFunction
Description
Property; specifies a function to determine which field (or field combination) of each item to
display. This function receives one parameter,
item, which is the item being rendered, and
must return a string representing the text to display. This property can be used to create
virtual columns that have no equivalent field in the item.
NOTE
The specified function operates in a nondefined scope.