[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] | Reference for unit 'Grids' (#lcl)

# TCustomDrawGrid.SetEditText

Sets the value used in the cell Editor to the specified text.

## Declaration

Source position: grids.pas line 1439

`protected procedure TCustomDrawGrid.SetEditText(`
`ACol: LongInt;`
`ARow: LongInt;`
`const Value: string`
`); override;`

## Arguments

`ACol` |  | Column number for the cell.
`ARow` |  | Row number for the cell.
`Value` |  | New value for the cell Editor.

## Description

SetEditText is an overridden method used to set the text displayed in the Editor for the cell specified in ACol and ARow.

SetEditText signals the OnSetEditText event handler (when assigned) to get the Value provided to the cell Editor. The inherited method is called to apply the cell value to the editor control.

SetEditText is used in KeyDown when the Escape key (VK_ESCAPE) is not handled by the grid control. It is called from the EditorGetValue method when a visible cell Editor is updated. It is called from EditorTextChanged method when the value in a cell Editor has been altered using the Change or Select methods in the editor control.

## See also

TCustomDrawGrid.OnSetEditText |  | Event handler signalled when the text in the cell Editor is assigned.
TCustomGrid.SetEditText |  | Sets the value used in the cell Editor to the specified text.