Example 1: TcxDataSummaryItems.OnSummary
By default, summary calculations involve all elements. In this example a summary representing the number of non-NULL item elements is evaluated. To modify the default summary calculation, you should write the TcxDataSummaryItems.OnSummary event. The Done flag indicates whether the value should be ignored. See the Creating Summaries topic to learn how to set summaries for a grid control.
procedure TForm1.cxGrid1DBTableView1TcxGridDBDataControllerTcxDataSummary
DefaultGroupSummaryItemsSummary(
ASender: TcxDataSummaryItems; Arguments: TcxSummaryEventArguments;
var OutArguments: TcxSummaryEventOutArguments);
begin
if (VarIsNull(OutArguments.Value)) then
OutArguments.Done := True;
end;