Wimark.Controls Class Library  

DataGridView.DataError Event

Occurs when an external data-parsing or validation operation throws an exception, or when an attempt to commit data to a data source fails.

[Visual Basic]
Public Event DataError As DataGridViewDataErrorEventHandler 
[C#]
public event DataGridViewDataErrorEventHandler DataError;
[C++]
public: __event DataGridViewDataErrorEventHandler* DataError;

Event Data

The event handler receives an argument of type DataGridViewDataErrorEventArgs containing data related to this event. The following DataGridViewDataErrorEventArgs property provides information specific to this event.

Property Description
Cancel Gets or sets a value indicating whether the event should be canceled.
ColumnIndex Gets the column index of the cell that raised the event.
Context Gets details about the state of the DataGridView when the error occurred.
Exception Gets the exception that represents the error.
RowIndex Gets the row index of the cell that raised the event.
ThrowException Gets or sets a value indicating whether to throw the exception after the DataGridViewDataErrorEventHandler delegate is finished with it.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows .NET Server family

See Also

DataGridView Class | DataGridView Members | Wimark.Controls Namespace