Typically, the ErrorText property is used when handling the CellValidating event of the DataGridView. If the cell's value fails some validation criteria, set the ErrorText property and cancel the commit operation by setting the Cancel property of the DataGridViewCellValidatingEventArgs to true. The text you specify is then displayed by the DataGridView, and the user is prompted to fix the error in the cell's data.
The following code example demonstrates how to use this property when handling error conditions in an unbound DataGridView. The AnnotateCell method sets an error message string to the ErrorText property.