From RAD Studio API Documentation
Jump to: navigation, search


property AllowInsert: Boolean read FAllowInsert write FAllowInsert default True;


__property bool AllowInsert = {read=FAllowInsert, write=FAllowInsert, default=1};


Type Visibility Source Unit Parent
property published
Vcl.DBCGrids TDBCtrlGrid


Determines whether the user can insert new records with the Insert key or append new records with the Ctrl+Insert key combination.

Set AllowInsert to false to prevent the TDBCtrlGrid object from inserting records.

If AllowInsert is false, TDBCtrlGrid does not insert records into the dataset when the user presses Insert or Ctrl+Insert or when the DoKey method is called with the Key parameter set to gkInsert or gkAppend. The TDBCtrlGrid object can still be used to delete records.

If AllowInsert is true (the default), TDBCtrlGrid inserts a new record into the dataset before the current record when the user presses Insert or appends a new record to the end of the dataset when the user presses Ctrl+Insert. Even with AllowInsert set to true, records cannot be inserted unless the dataset is in edit mode.

See Also