This documentation is archived and is not being maintained.

DataGridViewCheckBoxCell.ParseFormattedValue Method

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

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in system.windows.forms.dll)

public override Object ParseFormattedValue (
	Object formattedValue,
	DataGridViewCellStyle cellStyle,
	TypeConverter formattedValueTypeConverter,
	TypeConverter valueTypeConverter
)
public Object ParseFormattedValue (
	Object formattedValue, 
	DataGridViewCellStyle cellStyle, 
	TypeConverter formattedValueTypeConverter, 
	TypeConverter valueTypeConverter
)
public override function ParseFormattedValue (
	formattedValue : Object, 
	cellStyle : DataGridViewCellStyle, 
	formattedValueTypeConverter : TypeConverter, 
	valueTypeConverter : TypeConverter
) : Object
Not applicable.

Parameters

formattedValue

The display value of the cell.

cellStyle

The DataGridViewCellStyle in effect for the cell.

formattedValueTypeConverter

A TypeConverter for the display value type, or a null reference (Nothing in Visual Basic) to use the default converter.

valueTypeConverter

A TypeConverter for the cell value type, or a null reference (Nothing in Visual Basic) to use the default converter.

Return Value

The cell value.

Exception typeCondition

ArgumentNullException

cellStyle is a null reference (Nothing in Visual Basic).

FormatException

The FormattedValueType property value is a null reference (Nothing in Visual Basic).

ArgumentException

formattedValue is a null reference (Nothing in Visual Basic).

- or -

The type of formattedValue does not match the type indicated by the FormattedValueType property.

When the user edits a cell value and commits the change, the DataGridView control calls this method to convert the displayed value from the FormattedValueType to the ValueType. The control then sets the underlying cell value or data source value to the converted value.

This method converts the display value of the cell to an actual cell value using the values of the TrueValue, FalseValue, and IndeterminateValue properties if they have been set.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0
Show: