TTMSFNCDataGridRenderer.EditCell Method
Opens the in-place editor for the given cell.
API unit family: TMSFNCDataGridRenderer
Declaring type: TTMSFNCDataGridRenderer
Syntax
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 is resolved through OnGetInplaceEditorTarget and OnGetInplaceEditorType, then OnBeforeOpenInplaceEditor can change the initial value or cancel opening. For a custom editor type, OnGetInplaceEditorClass supplies the class; OnGetInplaceEditorProperties lets you configure the editor instance, and OnAfterOpenInplaceEditor fires once it is shown.
Commit with StopEditing or discard with CancelEditing.
Parameters
| Name | Description |
|---|---|
ACell |
Cell coordinate to edit. Disabled 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 (for text-style editors), as when the user starts typing on a cell. |
AValue |
Initial editor text used when AInsertKey is True. |
AKey |
Keyboard key that triggered editing, or 0 when editing was started programmatically. |