DataGridBoolColumn::AllowNull Property

 

Gets or sets a value indicating whether null values are allowed.

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

public:
property bool AllowNull {
	bool get();
	void set(bool value);
}

Property Value

Type: System::Boolean

true if null values are allowed, otherwise, false. The default is true.

When this property is set to false, the check boxes in the column have only two states: checked (true) and unchecked (false).

The following code example sets the AllowNull property.

void SetAllowNull()
{
   DataGridBoolColumn^ myGridColumn = dynamic_cast<DataGridBoolColumn^>(dataGrid1->TableStyles[ 0 ]->GridColumnStyles[ 0 ]);
   myGridColumn->AllowNull = false;
}

.NET Framework
Available since 1.1
Return to top
Show: