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

TCustomDBGrid.EditorIsReadOnly

EditorIsReadOnly determines if the editor can be enabled for the selected cell in the control.

Declaration

Source position: dbgrids.pas line 458

protected function TCustomDBGrid.EditorIsReadOnly: Boolean; override;

Function result

True when an editor cannot modify the select cell.

Description

EditorIsReadOnly is a Boolean function used to determine if the editor can be enabled for the selected cell in the control.

EditorIsReadOnly calls the inherited method to ensure that requirements from the ancestor class are respected. If the ancestor class returns True no actions are performed in the method.

EditorIsReadOnly locates the TField used to store data for the selected cell, and calls its CanModify method to determine if the Field can be modified. Additional logic is applied for lookup Fields; the TField.KeyFields for the Field are also examined to determine if any of them are marked as read-only.

EditorIsReadOnly ensures the dataset in DataLink is in edit mode. The GridStatus property is updated to include gsStartEditing prior to changing the dataset state, and removed from GridStatus after the dataset state has changed.

EditorIsReadOnly calls the EditingColumn method to synchronize the cell editor state to the value returned by the method.

See also

TCustomGrid.EditorIsReadOnly

  

Determines if the current column number is defined as read-only.


Version 3.2 Generated 2024-02-25 Home