The SummaryField2 class represents a single property in a SummaryRow instance.
Each SummaryRow instance specifies one or more SummayField2 instances
that are used to create a data summary.
Note: In the previous release of Flex, you used the SummaryField class
to create summary data.
The SummaryField2 class is new for Flex 4 and provides better performance than SummaryField.
Use the dataField property to specify the data field used to generate the summary,
the label property to specify the name of the data field created to hold the summary data,
and the summaryOperation property to specify how to create the summary for numeric fields.
You can specify one of the following values:
SUM, MIN, MAX, AVG, or COUNT.
Or you can specify an ISummaryCalculator implementation to calculate the summaries.
The following example creates summary rows based on two fields of the data provider
of the AdvancedDataGrid control:
The property used inside the summary object,
an instance of the SummaryObject class, to
hold summary information.
For example, if you set the label property to "Summary",
then the computed summary is placed in a property named "Summary"
in the summary object. The property of the SummaryObject instance
containing the summary data will appear as below:
public function SummaryField2(dataField:String = null, summaryOperation:Object = SUM)
Language Version :
ActionScript 3.0
Product Version :
Flex 4
Runtime Versions :
Flash Player 10, AIR 1.5
Constructor.
Parameters
dataField:String (default = null) — Data field for which the summary is computed.
summaryOperation:Object (default = SUM) — The function that should be performed on the children.
You can specify one of the following values for numeric fields:
SUM, MIN, MAX, AVG, or COUNT.
Or you can specify an ISummaryCalculator implementation to calculate the summaries.