Back to Devexpress

CellValue.TryCreateFromObject(Object, ICellValueConverter) Method

officefileapi-devexpress-dot-spreadsheet-dot-cellvalue-dot-trycreatefromobject-x28-system-dot-object-devexpress-dot-spreadsheet-dot-icellvalueconverter-x29.md

latest3.0 KB
Original Source

CellValue.TryCreateFromObject(Object, ICellValueConverter) Method

Tries to convert the specified object to a cell value using the custom converter.

Namespace : DevExpress.Spreadsheet

Assembly : DevExpress.Spreadsheet.v25.2.Core.dll

NuGet Package : DevExpress.Spreadsheet.Core

Declaration

csharp
public static CellValue TryCreateFromObject(
    object value,
    ICellValueConverter converter
)
vb
Public Shared Function TryCreateFromObject(
    value As Object,
    converter As ICellValueConverter
) As CellValue

Parameters

NameTypeDescription
valueObject

An object to be converted to a CellValue.

| | converter | ICellValueConverter |

A custom converter object that implements the ICellValueConverter interface.

|

Returns

TypeDescription
CellValue

A CellValue object. If the conversion cannot be performed, the TryCreateFromObject method returns null (Nothing in VB).

|

Remarks

To convert a cell value to an object, use the CellValue.ToObject method. For more information on cell values and their types, refer to Cell Data Types.

See Also

FromObject

ToObject

SetValue(Object)

Value

Cell Data Types

How to: Change a Cell or Cell Range Value

How to: Convert Objects to Cell Values and Cell Values to Objects

CellValue Class

CellValue Members

DevExpress.Spreadsheet Namespace