Start Validating event net

Validating event net

In previous example you’ve seen required field validator.

In a Win Form I'm doing initial validation in the Form. To make the code short only three fields are shown in the code.

So before saving data, I want to validate whether all the required fields are filled (Text Boxes) by the user. I would rather use a generic function that would be passed each control on the form and based on the type of the control, separate validation logic would be written.

Kettic Property Grid control for Windows Forms contains a variety of built-in editors used to edit different data types.

All the built in editors can be replaced by custom editors.

In other cases, such as when modifying existing values in the grid, validation would be done at the cell level because "normally" you would allow the user to change the value of only one cell.

As of version 2.2 of the grid, it is possible to provide custom error behaviors for both cells and rows (Cell Row) when the value of a cell does not pass the validation process.

This Property Grid control for Windows Forms allows the users easily to validate data before the data is committed.

The data validation process will re quire the Validate Property event and the data editing mode will be enabled by disabling the read-only mode of the Property Grid items.

in case extra validation like restricting validation to some of the controls only, that would be decided at the function calling level.

In my windows form projects , i have validated the fields using Boolean method.

For example, a list of states may appear after the user selects a specific country.