Cellvalidating cancel edit
My Data Grid View is bound to a Data Table via a Binding Source.
The first issue that I am having trouble with is moving the selected cell after I cancel an edit.
So the Cell Validating event cannot be fired when pressing the "Enter" key. The following code example shows how to use this event to validate the cell's value.
Here is a list of all validation events: Cell Validating: Fires when a cell loses input focus, enabling content validation.
Cell Validated: Fires after the cell has finished validating. Row Validated: Fires after a row has finished validating.
Data Error: Fires when an error on the Data Source side occurs, e.g.
The Cell Validating event only fires when losing input focus (before leaving the current cell) or when Gc Multi Row validates.
The default key setting assigns end edit without leaving the current cell action to the "Enter" key.
Handle the Cell Validated event to perform post validation processing.