ComponentOne True DBGrid for WinForms
BeforeColUpdateEventHandler Delegate

C1.Win.C1TrueDBGrid.4 Assembly > C1.Win.C1TrueDBGrid Namespace : BeforeColUpdateEventHandler Delegate
Raised after editing is completed in a cell.
Syntax
'Declaration
 
Public Delegate Sub BeforeColUpdateEventHandler( _
   ByVal sender As System.Object, _
   ByVal e As BeforeColUpdateEventArgs _
) 
public delegate void BeforeColUpdateEventHandler( 
   System.object sender,
   BeforeColUpdateEventArgs e
)

Parameters

sender
e
Remarks
The BeforeColUpdate event occurs after editing is completed in a cell, but before data is moved from the cell to the grid's internal copy buffer. The data specified by the OldValue argument moves from the cell to the grid's copy buffer when the user completes editing within a cell, as when tabbing to another column in the same row, pressing the Enter key, or clicking on another cell. Before the data has been moved from the cell into the grid's copy buffer, the BeforeColUpdate event is triggered. This event gives the application an opportunity to check the individual grid cells before they are committed to the grid's copy buffer. If your event procedure sets the Cancel argument to True, the previous value is restored in the cell, the grid retains focus, and the AfterColUpdate event is not triggered. Change the current cell text by setting OldValue to the value wanted to display (other than the previous value). To restore OldValue in the cell and permit the user to move focus off of the cell, set Cancel to False and set the cell to OldValue as follows:
See Also

Reference

BeforeColUpdateEventHandler Members
C1.Win.C1TrueDBGrid Namespace