ComponentOne True DBGrid Pro 8
AllowAddNew Property

AllowAddNew Property

Enables interactive record addition.

Syntax

TDBGrid.AllowAddNew= boolean

Remarks

Read/Write at run time and design time.

If True, the user can add records to the data source underlying the TDBGrid control.

If False (the default), the user cannot add records to the data source underlying the TDBGrid control.

If the AllowAddNew property is True, the last row displayed in the grid is left blank to permit users to enter new records. If the AllowAddNew property is False, the blank row (usually referred to as the AddNew row) is not displayed.

The underlying data source may not permit insertions even if the AllowAddNew property is True for the TDBGrid control. In this case, a trappable error occurs when the user tries to add a record.

Note

If AllowAddNew is True, you should also set AllowUpdate to True so that users will be able to type in the cells of the AddNew row.

See Also

TDBGrid Control

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback