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

# TCustomDBGrid.GridCanModify

Indicates if the DataLink is active and allows editing in the grid control.

## Declaration

Source position: dbgrids.pas line 479

`protected function TCustomDBGrid.GridCanModify: Boolean;`

## Function result

True when the grid can be modified.

## Description

GridCanModify indicates if the DataLink is active, and allows editing. The return value is True when all of the following conditions are satisfied:

- DataLink is Active.
- The CanModify property for the Dataset in DataLink is True.
- The ReadOnly property for the DataLink is False.
- The ReadOnly property for the control is set to False.
- dgEditing has been included in the Options for the control.

GridCanModify is called from the KeyDown method, and used in the implementation of private methods in the grid control.