dataFunction:Function
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 9, AIR 1.1 |
A callback function that returns the actual data for the attribute.
Use this callback function to return computed data based on the
actual data. For example, you can return the month name as a String
from actual date that represents the month as a number.
Or, you can calculate a value.
For example, your input data contains the ages of people,
such as 1, 4, 9, 10, 12, 15, or 20.
Your callback function can return an age group
that contains the age, as in 1-10, or 11-20.
The signature of the callback function is:
function myDataFunction(rowData:Object, dataField:String):Object;
where
rowData
contains the data for the row of
the input flat data, and
dataField
contains
the name of the data field.
The function can return a String or a Number.
The following example returns the age group for each age value
in the flat data:
private function ageGroupingHandler(rowData:Object, field:String):Object
{
return rowData[field] / 10;
}
Implementation public function get dataFunction():Function
public function set dataFunction(value:Function):void