Skip to main content
Table of Contents

TTMSFNCDataGridData.ColumnCustomCalculation Method

Computes a custom aggregate of a column over a row range and returns it.

API unit family: TMSFNCDataGridData Declaring type: TTMSFNCDataGridData

Syntax

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

Remarks

The callback receives the resolved range and level 0. The result is not written to the grid.

Parameters

Name Description
AColumn Zero-based column index.
ACustomCalculationCallback Function that computes the aggregate. When nil, OnCustomColumnCalculation is used, and the result is 0 when that is not assigned either.
AFromRow First zero-based row of the range; -1 (the default) selects all rows between the fixed rows.
AToRow Last zero-based row of the range, inclusive; -1 selects the default range.

Returns

The value returned by the callback or event.