Row validating

Rated 4.8/5 based on 621 customer reviews

Custom cell validation is done using the Leaving Edit and Validation Error events.In the Leaving Edit event, the custom validation is provided and in the Validation Error event, you can decided if you want to allow the cell to exit edit mode in the case where its value does not pass the validation process (see Example 2).This event is raised when the current cell is validated with the new value and the Is Valid property of the Current Cell Validating event is set to ‘true’.The event handler receives two arguments namely sender that handles Sf Data Grid and Current Cell Validated Event Args as objects.Note that the all editors, with the exception of the Grid Combo Box and the Grid Date Time Picker, will blink (if that error behavior is active). The Validating sample application included with Xceed Grid for Win Forms demonstrates all of the techniques and examples mentioned above and will provide you with a better understanding of how the grid's validation process works. Normally, the Error Description property would be set in either the Leaving Edit event of a cell or in the Ending Edit event of a row and reset in the Edit Left event of the cell or in the Edit Ended event of the row (see Example 4).

Cancel is set to true in the Leaving Edit event, when an exception is thrown in the Leaving Edit event and/or when a validation exception is thrown by the underlying datasource.

Custom row validation is done using the Ending Edit and Validation Error events.

In the Ending Edit event, the custom validation is provided and in the Validation Error event, you can decided if you want to allow the row to exit edit mode in the case where the values of one or more of its cells do not pass the validation process (see Example 1).

When the value is less than 50 it shows the Error Tooltip.

The event handler of the Current Cell Validating Event receives two arguments namely sender that handles Sf Data Grid and Current Cell Validating Event Args as objects.

Leave a Reply