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

# TCustomDrawGrid.GetEditText

Gets the text displayed in the Editor for the specified cell.

## Declaration

Source position: grids.pas line 1430

`protected function TCustomDrawGrid.GetEditText(`
`aCol: LongInt;`
`aRow: LongInt`
`):string; override;`

## Arguments

`aCol` |  | Column number for the cell.
`aRow` |  | Row number for the cell.

## Function result

Text used as the value in the Editor control.

## Description

GetEditText is an overridden method used to get the text displayed in the Editor for the specified cell. GetEditText signals the OnGetEditText event handler (when assigned) to get the text displayed in the Editor. The return value can be an empty string ('') when:

- OnGetEditText is not assigned.
- The cell at ACol and ARow is empty.
- Or, a value in ACol or ARow is not valid for the grid.

GetEditText is called from the EditorDoSetValue method when TGridMessages are dispatched to the Editor to set the edit mask and value used in the control.

## See also

TCustomGrid.GetEditText |  | Gets the text displayed in the Editor for the specified cell.