Vcl.DBCGrids.TDBCtrlGrid.AllowDelete

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property AllowDelete: Boolean read FAllowDelete write FAllowDelete default True;

C++

__property bool AllowDelete = {read=FAllowDelete, write=FAllowDelete, default=1};

Properties

Type Visibility Source Unit Parent
property published
Vcl.DbCGrids.pas
Vcl.DBCGrids.hpp
Vcl.DBCGrids TDBCtrlGrid

Description

Determines whether the user can delete the current record from the dataset by pressing Ctrl+Delete.

Set AllowDelete to false to prevent the TDBCtrlGrid object from deleting records.

When AllowDelete is false, TDBCtrlGrid will not delete records from the dataset when the user presses Ctrl+Delete or the DoKey method is called with the Key parameter set to gkDelete. The TDBCtrlGrid object can still be used to insert records.

When AllowDelete is true (the default), TDBCtrlGrid will delete the current record when the user presses Ctrl+Delete or when the DoKey method is called with the Key parameter set to gkDelete. Even with AllowDelete set to true, records cannot be deleted unless the dataset is in edit mode.

See Also