Visual Basic: DataGrid Control

AfterColUpdate Event

See Also   Example   Applies To

Occurs after data is moved from a cell in the DataGrid control to the control's copy buffer.

Syntax

Private Subobject**_AfterColUpdate([indexAsInteger**,] colindexAsInteger)

The AfterColUpdate event syntax has these parts:

Part Description
object An object expression that evaluates to an object in the Applies To list.
index An integer that identifies a control if it is in a control array.
colindex An integer that identifies the column in the control.

Remarks

When a user completes editing within a DataGrid control cell, as when tabbing to another column in the same row, pressing ENTER, or when the control loses focus, the BeforeColUpdate event is executed, and unless canceled, data from the cell is moved to the control's copy buffer. Once moved, the AfterColUpdate event is executed.

The AfterColUpdate event occurs after the BeforeColUpdate event, and only if the cancel argument in the BeforeColUpdate event is not set to True.

Once the AfterColUpdate event procedure begins, the cell data has already been moved to the control's copy buffer and can't be canceled, but other updates can occur before the data is committed to the Recordset.