ComponentOne True DBGrid for .NET (2.0) Search HelpCentral 

C1TrueDBGrid.AfterInsert Event

Occurs after a row has been added.

[Visual Basic]

Public Event AfterInsert As EventHandler

[C#]

public event EventHandler AfterInsert

[Delphi]

public property AfterInsert: EventHandler read remove_AfterInsert write add_AfterInsert;

Remarks

When the user selects the AddNew row (the last row in the grid) and enters a character in one of the cells, the BeforeInsert event is executed, and unless canceled, the row is scrolled up one line and its record selector changes to show that it has been modified. However, a new row has not yet been added to the database.

Once the user commits the new row by moving to another row within the grid, the BeforeUpdate event is triggered, followed by the AfterUpdate and AfterInsert events. If the BeforeUpdate event is canceled, then the AfterUpdate and AfterInsert events will not be raised.

When the AfterInsert event is triggered, the record has already been added to the database. The Bookmark property can be used to access the new record.

The AfterInsert event cannot be canceled.

See Also

C1TrueDBGrid Class | C1TrueDBGrid Members | C1.Win.C1TrueDBGrid Namespace


Send comments about this topic to ComponentOne.
Copyright © ComponentOne LLC. All rights reserved.