Skip to main content
Table of Contents

TTMSFNCDataGrid.EditCell Method

Opens the in-place editor for a cell.

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

Syntax

FMX.TMSFNCDataGrid.hppPascalC++
procedure EditCell(ACell: TTMSFNCDataGridCellCoord; ACellStart: TTMSFNCDataGridEditCellStart = gcsNone; AInsertKey: Boolean = False; AValue: string = ''; AKey: Word = 0); virtual;
virtual void __fastcall EditCell(const TTMSFNCDataGridCellCoord &ACell, TTMSFNCDataGridEditCellStart ACellStart = (TTMSFNCDataGridEditCellStart)(0x0), bool AInsertKey = false, System::UnicodeString AValue = System::UnicodeString(), System::Word AKey = (System::Word)(0x0));

Remarks

The editor type is resolved through OnGetInplaceEditorType (and OnGetInplaceEditorClass for custom editors); OnBeforeOpenInplaceEditor can cancel opening and OnGetInplaceEditorProperties configures the editor instance. Commit with StopEditing or discard with CancelEditing.

Parameters

Name Description
ACell Cell coordinate to edit. Disabled (fixed or hidden) cells are ignored.
ACellStart Caret position when the editor opens: gcsNone (default), gcsStart or gcsEnd.
AInsertKey When True, the editor starts with AValue instead of the current cell value, as when the user starts typing on a cell.
AValue Initial editor text used when AInsertKey is True.
AKey Key that triggered editing, or 0 (default) when editing is started in code.