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:
[TypeConverterAttribute((StringConverter^::typeid))]
property Object^ FalseValue {
	Object^ get();
	void set(Object^ value);
}

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 = dynamic_cast<DataGridBoolColumn^>(myDataGrid->TableStyles[ "Customers" ]->GridColumnStyles[ "Current" ]);

      // Set TrueValue, FalseValue, and NullValue.
      myGridColumn->TrueValue = true;
      myGridColumn->FalseValue = false;
      myGridColumn->NullValue = Convert::DBNull;
   }

.NET Framework
Available since 1.1
Return to top
Show: