Validation is done through the following events: 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.
Current Cell Validating Event Args object contains the following properties: When Is Valid property is set to ‘false’, the editor of the current cell does not shift to focus.
The validation modes are as follows: Sf Data Grid provide supports Validation by implementing IData Error Info and INotify Data Error Info interface in Data Model class.
When working with very large amounts of data, you can set the Data Grid View.
The following table provides direct links to common tasks.dgv_tasks Although the Data Grid View control replaces and adds functionality to the Data Grid control of previous versions, the Data Grid control is retained for both backward compatibility and future use if you choose.
For additional information about the features available in the Data Grid View control, see Data Grid View Control (Windows Forms).
The following code example illustrates how the Email field is validated for proper format by using Regex.
An error message is displayed in the cell when the validation fails.