Fired before the current cell changes to a different cell.
Public Event BeforeRowColChange As BeforeRowColChangeEventHandler
The following parameters are available:
|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.|
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.