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

# TCustomDBGrid.EditorCanAcceptKey

EditorCanAcceptKey determines if the specified character can be applied to the Field for the editor.

## Declaration

Source position: dbgrids.pas line 453

`protected function TCustomDBGrid.EditorCanAcceptKey(`
`const ch: TUTF8Char`
`):Boolean; override;`

## Arguments

`ch` |  | Key to examine in the method.

## Function result

True when the character can be applied to the field.

## Description

EditorCanAcceptKey is an overridden Boolean function which determines if the cell editor can accept the character specified in ch. EditorCanAcceptKey requires that the linked dataset be active to access the SelectedField for the control. The Field cannot be an AutoIncrement, Lookup, Calculated, or Blob Field type. The return value is False if any of these conditions are not satisfied.

EditorCanAcceptKey calls the IsValidChar routine to determine if the UTF8-encoded value in ch can be applied to the dataset for the control.

## See also

TCustomGrid.EditorCanAcceptKey |  | Returns True if the Editor is able to accept the specified UTF-8 character.