RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TDBCtrlGrid.AllowInsert Property

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

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

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. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!