Occurs after a cell has been updated.
[Visual Basic]
Public Event AfterColUpdate As ColEventHandler
[C#]
public event ColEventHandler AfterColUpdate
[Delphi]
public property AfterColUpdate: ColEventHandler read remove_AfterColUpdate write add_AfterColUpdate;
Remarks
When the user completes editing within a grid cell, as when tabbing to another column in the same row, pressing the ENTER key, or clicking on another cell, the BeforeColUpdate event is executed, and unless canceled, data from the cell is moved to the grid's copy buffer. Once moved, the AfterColUpdate event is executed.
The AfterColUpdate event occurs after the BeforeColUpdate event, and only if the BeforeColUpdateEventArgs.Cancel property in the BeforeColUpdate event is not set to True.
Once the AfterColUpdate event procedure begins, the cell data has already been moved to the grid's copy buffer and cannot be canceled, but other updates can occur before the data is committed to the data source.
Example
The following code uses the AfterColUpdate event to show text label after a cell has been updated:
Private Sub C1TrueDBGrid1_AfterColUpdate(ByVal sender As System.Object, ByVal e As C1.Win.C1TrueDBGrid.ColEventArgs) Handles C1TrueDBGrid1.AfterColUpdate
Me.Label1.Text = "Note: Record has been updated."
End Sub
· C#
private void c1TrueDBGrid1_AfterColUpdate(object sender, C1.Win.C1TrueDBGrid.ColEventArgs e)
{
this.label1.Text = "Note: Record has been updated.";
}
· Delphi
prodedure TWinForm.C1TrueDBGrid1_AfterColUpdate(sender: System.Object; e: C1.Win.C1TrueDBGrid.ColEventArgs);
var
S: string;
begin
Self.Label1.Text := 'Note: Record has been updated.';
end;
See Also
C1TrueDBGrid Class | C1TrueDBGrid Members | C1.Win.C1TrueDBGrid Namespace
Send comments about this topic to ComponentOne. Copyright © ComponentOne LLC. All rights reserved. |