Validation

In many cases, edit masks alone are not enough to ensure that the data enters by the user was valid. For example, a mask won't let you specify a range of possible values, or validate the current cell based on the contents of another cell. In these cases, trap the ValidateEdit event and see if the value contained in the EditText property is a valid entry for the current cell (at this point, the Text property still has the original value in it). If the input is invalid, set the Cancel parameter to True and the grid will remain in edit mode until the user types a valid entry.