New to Telerik UI for WinFormsStart a free 30-day trial

This class is responsible for conversion of data between RadGridView and its data source

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.GridView.dll

Syntax:

C#
public class RadDataConverter

Inheritance: objectRadDataConverter

Properties

Gets the instance.

C#
public static RadDataConverter Instance { get; }
Property Value:

The instance.

Methods

Equalses the null value.

C#
public bool EqualsNullValue(object value, IDataConversionInfoProvider dataColumn)
Parameters:valueobject

The value.

dataColumnIDataConversionInfoProvider

The data column.

Returns:

bool

Gets the value of the cell as formatted for display.

C#
public object Format(object value, Type targetType, bool coerceNullValue, IDataConversionInfoProvider converstionInfoProvider)
Parameters:valueobject

The value to be formatted.

targetTypeType

The Type that value should be converted for.

coerceNullValuebool

If the value is null, the NullValue should be considered as result.

converstionInfoProviderIDataConversionInfoProvider

An instance of IDataConversionInfoProvider.

Returns:

object

Returns the formatted value

Gets the value of the cell as formatted for display.

C#
public object Format(object value, Type targetType, IDataConversionInfoProvider converstionInfoProvider)
Parameters:valueobject

The value to be formatted.

targetTypeType

The Type that value should be converted for.

converstionInfoProviderIDataConversionInfoProvider

An instance of IDataConversionInfoProvider.

Returns:

object

Returns the formatted value

Converts a value formatted for display to an actual cell value.

C#
public object Parse(IDataConversionInfoProvider converstionInfoProvider, object value, CultureInfo cultureInfo)
Parameters:converstionInfoProviderIDataConversionInfoProvider

An instance of IDataConversionInfoProvider.

valueobject

The value to be converted.

cultureInfoCultureInfo

The CultureInfo object that will be used while parsing.

Returns:

object

Returns the converted value

Converts a value formatted for display to an actual cell value.

C#
public object Parse(IDataConversionInfoProvider converstionInfoProvider, object value)
Parameters:converstionInfoProviderIDataConversionInfoProvider

An instance of IDataConversionInfoProvider.

valueobject

The value to be converted.

Returns:

object

Returns the converted value

Formats a value for display to an actual cell value.

C#
public Exception TryFormat(object value, Type targetType, IDataConversionInfoProvider converstionInfoProvider, out object result)
Parameters:valueobject

The value to be formatted.

targetTypeType

The Type that value should be converted for.

converstionInfoProviderIDataConversionInfoProvider

An instance of IDataConversionInfoProvider.

resultobject

The object instance that will hold the result.IDataConversionInfoProvider.

Returns:

Exception

The generated exception if Parse has failed for some reason, null otherwise.

Converts a value formatted for display to an actual cell value.

C#
public Exception TryParse(IDataConversionInfoProvider converstionInfoProvider, object value, out object result)
Parameters:converstionInfoProviderIDataConversionInfoProvider

An instance of IDataConversionInfoProvider.

valueobject

The value to be converted.

resultobject

The object instance that will hold the result.IDataConversionInfoProvider.

Returns:

Exception

The generated exception if Parse has failed for some reason, null otherwise.