DataGridBoolColumn.AllowNull プロパティ

定義

null 値を使用できるかどうかを示す値を取得または設定します。

public:
 property bool AllowNull { bool get(); void set(bool value); };
public bool AllowNull { get; set; }
member this.AllowNull : bool with get, set
Public Property AllowNull As Boolean

プロパティ値

null 値を使用できる場合は true。それ以外の場合は false。 既定値は、true です。

次のコード例では、AllowNull プロパティを設定します。

void SetAllowNull()
{
   DataGridBoolColumn^ myGridColumn = dynamic_cast<DataGridBoolColumn^>(dataGrid1->TableStyles[ 0 ]->GridColumnStyles[ 0 ]);
   myGridColumn->AllowNull = false;
}
private void SetAllowNull(){
    DataGridBoolColumn myGridColumn = (DataGridBoolColumn)dataGrid1.TableStyles[0].GridColumnStyles[0];
    myGridColumn.AllowNull = false;
 }
Private Sub SetAllowNull()
    Dim myGridColumn As DataGridBoolColumn = CType(dataGrid1.TableStyles(0).GridColumnStyles(0), DataGridBoolColumn)
    myGridColumn.AllowNull = False
End Sub

注釈

このプロパティが false に設定されている場合、列のチェック ボックスには、チェック () とオフfalse (true) の 2 つの状態しかありません。

適用対象

こちらもご覧ください