DataBindingErrorType Enum
Lists possible error causes relevant to cell range data binding.
Namespace: DevExpress.Spreadsheet
Assembly: DevExpress.Spreadsheet.v24.2.Core.dll
NuGet Package: DevExpress.Spreadsheet.Core
Declaration
Members
Name | Description |
---|---|
CannotDeleteLastRow
|
When a cell range serves as a data source, an attempt to remove a row fails if it is the only row in the data source, because the data source must contain at least one row. |
BindingRangeHasMergedCells
|
When binding a cell range to the data source, the range has merged cells, which is not allowed. |
MaximumNumberOfRowsExceeded
|
When binding a cell range to the data source, the error occurs when the index of a row required to bind to the data source record exceeds the maximum number of rows allowed in the worksheet. |
MaximumNumberOfColumnsExceeded
|
When binding a cell range to the data source, the error occurs when the index of a column required to bind to the data source field exceeds the maximum number of columns allowed in the worksheet. |
CannotInsertRows
|
When binding a cell range to the data source, the range cannot insert rows to accommodate new data rows in the data source. This may happen in a situation when there are two binding ranges on the same worksheet placed horizontally one after another, and one range is bound to a read-only data source. When a record is added to the editable data source, the corresponding range cannot insert a row to display the record because such insertion is prohibited by the read-only status of another binding range. |
CannotRemoveRows
|
When binding a cell range to the data source, the range cannot remove rows to reflect row removal in the data source. This may happen in a situation when there are two binding ranges on the same worksheet placed horizontally one after another, and one range is bound to a read-only data source. When a record is removed from the editable data source, the corresponding range cannot remove a row to display the record because such removal is prohibited by the read-only status of another binding range. |
DataOutOfSync
|
When binding a cell range to the data source, indicates that the number of data rows in the binding range and in the data source differ. This error may occur after row insertion or deletion from a data source bound to the range which cannot insert or delete rows. |
CannotModifyCellsWithFormulas
|
When a cell range serves as a data source and the RangeDataSourceOptions.PreserveFormulas option has been set to true, an attempt to modify a cell value fails if a cell contains a formula. |
ColumnCountMismatch
|
Indicates that the number of data fields in the bound data source exceeds the number of rows in the target worksheet range. |
Related API Members
The following properties accept/return DataBindingErrorType values:
Example
spreadsheetControl1.Document.Worksheets[0].DataBindings.Error += DataBindings_Error;
private void DataBindings_Error(object sender, DataBindingErrorEventArgs e) {
MessageBox.Show(String.Format("Error at worksheet.Rows[{0}].\n The error is : {1}", e.RowIndex, e.ErrorType.ToString()), "Binding Error");
}