BeforeRowColChange Event

Fired before the current cell changes to a different cell.

Syntax

Public Event BeforeRowColChange As BeforeRowColChangeEventHandler

Applies To

Grid Object

Parameters

The following parameters are available:

Parameter Description
OldRow Row number of cell losing the focus.
OldCol Column number of cell losing the focus.
NewRow Row number of cell receiving the focus.
NewCol Column number of cell receiving the focus.
Cancel Set this value to True to prevent the focus from moving.

Remarks

This event gets fired before the CurrentRowIndex and CurrentColIndex properties change, either as a result of user actions or through code. It allows you to prevent the selection of certain cells, thus creating "protected" ranges on a grid.

BeforeRowColChange It is fired only when the CurrentRowIndex and CurrentColIndex property are about to change. To prevent the extended selection of a range, you also need to handle the BeforeSelChange event.

See Also

AfterRowColChange Event