Skip to main content
Table of Contents

TTMSFNCDataGrid.RowAverage Method

Returns the average of the numeric values in a row.

API unit family: TMSFNCDataGrid Declaring type: TTMSFNCDataGrid Inherited from: TTMSFNCCustomDataGrid

Syntax

FMX.TMSFNCDataGrid.hppPascalC++
function RowAverage(ARow: Integer; AFromColumn: Integer = -1; AToColumn: Integer = -1): Double;
double __fastcall RowAverage(int ARow, int AFromColumn = 0xffffffff, int AToColumn = 0xffffffff);

Remarks

The same column selection as RowSum applies.

Parameters

Name Description
ARow Zero-based row index.
AFromColumn First column to include, or -1 for the whole data range.
AToColumn Last column to include, or -1 for the whole data range.

Returns

Sum divided by the number of counted cells, or 0 when no cell is counted.