Skip to main content
Table of Contents

TTMSFNCCustomDataGrid.ColumnCustomCalculation Method

Computes a custom aggregate for a column.

API unit family: TMSFNCDataGrid Declaring type: TTMSFNCCustomDataGrid

Syntax

FMX.TMSFNCDataGrid.hppPascalC++
function ColumnCustomCalculation(AColumn: Integer; ACustomCalculationCallback: TTMSFNCDataGridDataCustomColumnCalculationCallback = nil; AFromRow: Integer = -1; AToRow: Integer = -1): Double;
double __fastcall ColumnCustomCalculation(int AColumn, Fmx::Tmsfncdatagriddata::_di_TTMSFNCDataGridDataCustomColumnCalculationCallback ACustomCalculationCallback = Fmx::Tmsfncdatagriddata::_di_TTMSFNCDataGridDataCustomColumnCalculationCallback(), int AFromRow = 0xffffffff, int AToRow = 0xffffffff);

Remarks

When either bound is -1, the range passed on is the rows between the fixed top and fixed bottom rows. The callback is responsible for iterating the rows.

Parameters

Name Description
AColumn Zero-based column index.
ACustomCalculationCallback Function called once with (AColumn, ALevel, AFromRow, AToRow) that returns the result; ALevel is 0. When nil, the OnCustomColumnCalculation event is used instead.
AFromRow First row to include, or -1 for the whole data range.
AToRow Last row to include, or -1 for the whole data range.

Returns

The value returned by the callback or event handler.