Skip to main content
Table of Contents

TTMSFNCDataGrid.AutoFill Method

Fills a target range by extending the pattern of a source range, like dragging the fill handle.

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

Syntax

FMX.TMSFNCDataGrid.hppPascalC++
procedure AutoFill(const ASourceStart: TTMSFNCDataGridCellCoord; const ASourceEnd: TTMSFNCDataGridCellCoord; const ATargetStart: TTMSFNCDataGridCellCoord; const ATargetEnd: TTMSFNCDataGridCellCoord; const ADirection: TTMSFNCDataGridDataAutoFillDirection = gafdAuto);
void __fastcall AutoFill(const TTMSFNCDataGridCellCoord &ASourceStart, const TTMSFNCDataGridCellCoord &ASourceEnd, const TTMSFNCDataGridCellCoord &ATargetStart, const TTMSFNCDataGridCellCoord &ATargetEnd, const TTMSFNCDataGridDataAutoFillDirection ADirection = (TTMSFNCDataGridDataAutoFillDirection)(0x0));

Remarks

Numeric and date series continue their step, custom lists continue their sequence, other values are repeated. For every target cell OnAutoFillCalculateValue can supply the value and OnBeforeApplyAutoFill can change or reject it; OnAfterApplyAutoFill follows each write. The interactive fill handle is enabled with Options.Selection.AutoFill.

Parameters

Name Description
ASourceStart Top-left cell of the source pattern range.
ASourceEnd Bottom-right cell of the source pattern range.
ATargetStart Top-left cell of the range to fill.
ATargetEnd Bottom-right cell of the range to fill.
ADirection Fill direction; gafdAuto (default) derives it from the position of the target relative to the source.