RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TDBCtrlGrid.AllowDelete Property

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

Pascal
property AllowDelete: Boolean;
C++
__property Boolean AllowDelete;

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. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!