DataGridViewImageCell::FormattedValueType Property
Gets the type of the formatted value associated with the cell.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Property Value
Type: System::Type^A Type object representing display value type of the cell, which is the Image type if the ValueIsIcon property is set to false or the Icon type otherwise.
The value of this property is a property is a Type object representing either the Image type or the Icon type because a DataGridViewImageCell can only handle graphic images.
The following code example demonstrates how to use the DataGridViewCell::FormattedValueType property to determine the type of the cell contents. In this example, the DataGridViewCell::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.
Available since 2.0