WorksheetDataBindingCollection.Error Event
Occurs when a binding cannot be completed successfully.
Namespace: DevExpress.Spreadsheet
Assembly: DevExpress.Spreadsheet.v24.2.Core.dll
NuGet Package: DevExpress.Spreadsheet.Core
#Declaration
event DataBindingErrorEventHandler Error
#Event Data
The Error event's data class is DataBindingErrorEventArgs. The following properties provide information specific to this event:
Property | Description |
---|---|
Binding |
Indicates whose value is updated during binding. |
Column |
Gets the index of the column in which an error occurs. |
Data |
Gets a binding object whose binding caused an error. |
Error |
Indicates the cause of an error. |
Row |
Gets the index of the row in which an error occurs. |
#Remarks
The Error event indicates that an error occurs in cell range data binding. The DataBindingErrorEventArgs.ErrorType property details the cause of the error, the DataBindingErrorEventArgs.BindingDirection indicates whose value is being updated during binding.
#Example
private void DataBindings_Error(object sender, DataBindingErrorEventArgs e) {
string msg = String.Format("The error {0} occurs in attempt to {1} in row with index= {2}",
e.ErrorType.ToString(), e.BindingDirection.ToString(), e.RowIndex);
MessageBox.Show(msg, "Binding Error");
}
#Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the Error event.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.