C datagridview cellvalidating cancel


The Cell Validating event handler is where you determine whether the value of a cell in the School Name column is empty. Data Grid View Cell Validating Event Args class to true.If the cell value fails validation, set the Cancel property of the System. This causes the Data Grid View control to prevent the cursor from leaving the cell.