Class
InvalidDataTypeException

Thrown when a worksheet column contains mixed data types that cannot be reconciled during DataTable export with type inference enabled.

Definition

Namespace:Telerik.Windows.Documents.Spreadsheet.FormatProviders

Assembly:Telerik.Windows.Documents.Spreadsheet.dll

Syntax:

cs-api-definition
public class InvalidDataTypeException : Exception, ISerializable

Inheritance: objectExceptionInvalidDataTypeException

Implements: ISerializable

Inherited Members Exception.GetBaseException()Exception.ToString()Exception.GetType()Exception.TargetSiteException.MessageException.DataException.InnerExceptionException.HelpLinkException.SourceException.HResultException.StackTraceException.SerializeObjectState

Constructors

InvalidDataTypeException(string, string, string, int, int)

Initializes a new instance of the InvalidDataTypeException class with details about the type conflict.

Declaration

cs-api-definition
public InvalidDataTypeException(string message, string expectedDataType, string currentDataType, int columnIndex, int rowIndex)

Parameters

message

string

The message that describes the error.

expectedDataType

string

The expected DataType.

currentDataType

string

The data type of the current cell.

columnIndex

int

The index of the column where the invalid data is.

rowIndex

int

The index of the row where the invalid data is.

Properties

ColumnIndex

Gets the zero-based column index where the type conflict occurred.

Declaration

cs-api-definition
public int ColumnIndex { get; }

Property Value

int

CurrentDataType

Gets the conflicting data type encountered in the cell.

Declaration

cs-api-definition
public string CurrentDataType { get; }

Property Value

string

ExpectedDataType

Gets the data type initially inferred for the column.

Declaration

cs-api-definition
public string ExpectedDataType { get; }

Property Value

string

RowIndex

Gets the zero-based row index where the type conflict occurred.

Declaration

cs-api-definition
public int RowIndex { get; }

Property Value

int