The requested page is not available for the requested platform. You are viewing the content for .NET Framework 4.5.2+ platform.
.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
Row

IDataValueConverter.TryConvert(Object, Int32, out CellValue) Method

Converts data being imported to the cell value.

Namespace: DevExpress.Spreadsheet

Assembly: DevExpress.Spreadsheet.v19.1.Core.dll

Declaration

bool TryConvert(
    object value,
    int index,
    out CellValue result
)
Function TryConvert(
    value As Object,
    index As Integer,
    ByRef result As CellValue
) As Boolean
bool TryConvert(
    object value,
    int index,
    out CellValue result
)
Function TryConvert(
    value As Object,
    index As Integer,
    ByRef result As CellValue
) As Boolean

Parameters

Name Type Description
value Object

An object that is the data being imported to a cell.

index Int32

An integer that is the index of the column in the data source.

result CellValue

A CellValue object that is the value which will be inserted in a cell.

Parameters

Name Type Description
value Object

An object that is the data being imported to a cell.

index Int32

An integer that is the index of the column in the data source.

result CellValue

A CellValue object that is the value which will be inserted in a cell.

Returns

Type Description
Boolean

true, if a conversion is successful; otherwise, false.

Returns

Type Description
Boolean

true, if a conversion is successful; otherwise, false.

Remarks

When importing data to a worksheet, you can use the WorksheetExtensions.Import method overload that has the IDataValueConverter interface as a parameter. It enables you to change data before insertion in a worksheet.

To accomplish data conversion, create a class that implements the IDataValueConverter interface and pass it as the parameter to the WorksheetExtensions.Import method.

See Also