DataGridViewCell::FormattedValueType Property

 

Gets the type of the formatted value associated with the cell.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public:
[BrowsableAttribute(false)]
property Type^ FormattedValueType {
	virtual Type^ get();
}

Property Value

Type: System::Type^

A Type representing the type of the cell's formatted value.

The Value property is the actual data object contained by the cell, whereas the FormattedValue property is the formatted representation of the data. The ValueType and FormattedValueType properties correspond to the data types of these values, respectively.

The following code example demonstrates how to use the FormattedValueType property to determine the type of the cell contents. In this example, the FormattedValueType property is used to determine whether the cell contains a String before attempting to convert the value. This example is part of a larger example available in the DataGridView::SelectionChanged event.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 2.0
Return to top
Show: