DataGridViewTextBoxCell::FormattedValueType Property
.NET Framework (current version)
Gets the type of the formatted value associated with the cell.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
The type of the underlying formatted value is always String because a text box only handles text information
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.
.NET Framework
Available since 2.0
Available since 2.0
Show: