Note that only the Cell Validating event can keep the editor active,when the validation fails and it does not allow the user to exit the cell until a valid value is filled.

However, pressing the Esc key in this situation will revert the initial value of the cell and it will close the editor. The Row Validating event has a slightly different behavior.

However, the user may prefer to validate all the data cells in a row at once.

This scenario can be achieved by using the Row Validating event, which is fired when the user tries to change the current row (changing to another row or when the control loses focus).

I handle the Row Validating event and do one final validation on the row as a whole to ensure everything is cool.

Of course if there is an issue I Cancel the validation and the row is not committed.

It is a Flags Enumeration and can take the following values: The cell validation occurs when a Grid View Cell is edited and its new data is about to be committed. You can do the same thing per row, using the Row Validating event. Length Figure 4 shows the result from a failed validation.

At this moment, a Cell Validating event is fired and since the new value is not committed yet to the underlying data object, here is the perfect place for applying a custom UI validation. The Row Validating event is very similar to the Cell Validating event. Once you have added such errors, you will have to explicitly clear them when needed.

Alternatively, you can send your complete project to us. Thanks, Marion Disclaimer: The information provided on Dev and its affiliated web properties is provided "as is" without warranty of any kind.

Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose.

Could you please check how the attached project works?

If it works well, please try to reproduce this issue using it, and send the project back to us.

Canceling this event prevents the user from exiting the cell until a valid value is entered or the edit process is canceled (via Esc key).