The SummaryRow class represents a summary row of the AdvancedDataGrid.
You create summary data about your data groups by using the summaries property
of the GroupingField or GroupingCollection class.
You display the summary data in an existing row of the AdvancedDataGrid control,
or display it in a separate row.
The summaries property of the GroupingField or GroupingCollection class takes an
instance of the SummaryRow class. You then use the fields property
of the SummaryRow class to specify an Array of one or more SummaryField/SummaryField2 instances
that define the fields of the data used to create the summary.
SummaryField2 needs to be used when using GroupingCollection2.
The following example creates summary rows based on two fields of the data provider
of the AdvancedDataGrid control:
Specifies a callback function that defines the summary object,
which is an instance of the SummaryObject class.
The SummaryObject instance collects summary data for display in the
AdvancedDataGrid control.
The AdvancedDataGrid control adds the SummaryObject instance to the
data provider to display the summary data in the control.
Therefore, define within the SummaryObject instance the properties that you want to display.
You use this property with the SummaryField.summaryFunction property,
which defines a callback function to perform the summary calculation.
The GroupingCollection class adds a property called children to the Object.
The callback function must have the following signature:
Specifies where the summary row appears in the AdvancedDataGrid control.
Possible values are:
"first" - Create a summary row as the first row in the group.
"last" - Create a summary row as the last row in the group.
"group" - Add the summary data to the row corresponding to the group.
You can specify multiple values, separated by a space.
For example, a value of "last group" shows the same summary row
at the group level and in the last row of the children.