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

# TCustomGrid.Editor

The editor control used to modify the value in the current cell.

## Declaration

Source position: grids.pas line 1244

`protected property TCustomGrid.Editor : TWinControl read FEditor write SetEditor;`

## Description

Editor is a TWinControl descendant which contains the control used to edit the value in the current cell for the grid control.

There are several editor styles available for columns on the grid control: String, Button, Composite, and Pick List. Button editors display a button that can be clicked to perform actions which determine the value for the cell. A composite editor uses an editor for the string value and a button to perform additional actions. A pick list editor allows selection from one of the predetermined values for the cell. The String editor is essentially a TEdit control, and is the default editor style used in the grid control.

The Editor style is determined either by examining values in the column definition stored in the Columns property, or using the OnSelectEditor event handler. OnSelectEditor is signalled when Columns has not been Enabled in the grid.

Editor display behavior is controlled by properties like Options and AutoEdit.

Options can be used to enabled / disabled cell editor features using the following:

goEditing
  Cell editing is allowed for the grid control. Omit to disable cell editing.
goAlwaysShowEditor
  The cell editor for the current cell is always displayed. Omit to disable. The cell editor can be toggled using F2, Enter, or a mouse click in the current cell.

The AutoEdit property determines whether a cell is automatically placed in edit mode as soon as it is selected. This is basically the same as including goAlwaysShowEditor in the Options property.