Occurs after a row has been updated.
[Visual Basic]
Public Event AfterUpdate As EventHandler
[C#]
public event EventHandler AfterUpdate
[Delphi]
public property AfterUpdate: EventHandler read remove_AfterUpdate write add_AfterUpdate;
Remarks
When the user moves to another row, or the UpdateData method of the grid or the DataSet object is executed, data is moved from the grid's copy buffer to the Data control's copy buffer and written to the database. Once the write operation is complete, the AfterUpdate event is triggered.
The Bookmark property does not reflect the newly added row because of the row being inserted.
The AfterUpdate event cannot be canceled.
Example
The following code uses the AfterUpdate event to show the message "The row has been updated." after a row has been updated:
Private Sub C1TrueDBGrid1_AfterUpdate(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles C1TrueDBGrid1.AfterUpdate
MessageBox.Show("The row has been updated.", "Row Update Notification", MessageBoxButtons.OK, MessageBoxIcon.Information)
End Sub
· C#
private void c1TrueDBGrid1_AfterUpdate(object sender, EventArgs e)
{
MessageBox.Show("The row has been updated.", "Row Update Notification", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
· Delphi
procedure C1TrueDBGrid1_AfterUpdate(sender: System.Object; e: EventArgs);
begin
MessageBox.Show('The row has been updated.', 'Row Update Notification', MessageBoxButtons.OK, MessageBoxIcon.Information);
end;
See Also
C1TrueDBGrid Class | C1TrueDBGrid Members | C1.Win.C1TrueDBGrid Namespace
Send comments about this topic to ComponentOne. Copyright © ComponentOne LLC. All rights reserved. |