ComponentOne True DBGrid for .NET (2.0) Search HelpCentral 

C1TrueDBGrid.AfterColEdit Event

Occurs after editing is completed.

[Visual Basic]

Public Event AfterColEdit As ColEventHandler

[C#]

public event ColEventHandler AfterColEdit

[Delphi]

public property AfterColEdit: ColEventHandler read remove_AfterColEdit write add_AfterColEdit;

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 and AfterColUpdate events are executed, and data from the cell is moved to the grid's copy buffer. The AfterColEdit event immediately follows the AfterColUpdate event.

When editing is completed in a grid cell, this event is always triggered, even if no changes were made to the cell or the BeforeColUpdate event was canceled.

The AfterColEdit event will not be raised if the BeforeColEdit event is canceled.

Example

The following code uses the AfterColEdit event to clear the editing instructions after column editing is complete:

·      Visual Basic

       Private Sub C1TrueDBGrid1_AfterColEdit (ByVal sender As Object, ByVal e As C1.Win.C1TrueDBGrid.ColEventArgs) Handles C1TrueDBGrid1.AfterColEdit

           ' Clear editing instructions.

           Me.Label1.Text = "

       End Sub

·      C#

       private void c1TrueDBGrid1_AfterColEdit(object sender, C1.Win.C1TrueDBGrid.ColEventArgs e)

       {

           // Clear editing instructions.

           this.label1.Text = ";

       }

·      Delphi

       prodedure TWinForm.C1TrueDBGrid1_AfterColEdit(sender: System.Object; e: C1.Win.C1TrueDBGrid.ColEventArgs);

       var

         S: string;

       begin

         // Clear editing instructions.

         Self.Label1.Text := '';

       end;

For an example demonstrating the AfterColEdit event, see the Column Editing Events topic.

See Also

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


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