DataGridBoolColumn.FalseValue Property


Gets or sets the actual value used when setting the value of the column to false.

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

public object FalseValue { get; set; }

Property Value

Type: System.Object

The value, typed as Object.

The FalseValue, NullValue, and TrueValue properties determine the actual values pushed into the data source.

The following code example sets the TrueValue, FalseValue, and NullValue properties of a DataGridBoolColumn.

private void SetBoolColumnValues(){
   DataGridBoolColumn myGridColumn;
   // Get the DataGridBoolColumn you are setting.
   myGridColumn = (DataGridBoolColumn) myDataGrid.
   // Set TrueValue, FalseValue, and NullValue.
   myGridColumn.TrueValue = true;
   myGridColumn.FalseValue = false;
   myGridColumn.NullValue = Convert.DBNull;

.NET Framework
Available since 1.1
Return to top