null 値を使用できるかどうかを示す値を取得または設定します。
Public Property AllowNull As Boolean
[C#]
public bool AllowNull {get; set;}
[C++]
public: __property bool get_AllowNull();public: __property void set_AllowNull(bool);
[JScript]
public function get AllowNull() : Boolean;public function set AllowNull(Boolean);
プロパティ値
null 値を使用できる場合は true 。それ以外の場合は false 。
使用例
[Visual Basic, C#, C++] AllowNull プロパティを設定する例を次に示します。
Private Sub SetAllowNull()
Dim myGridColumn As DataGridBoolColumn = CType(dataGrid1.TableStyles(0).GridColumnStyles(0), DataGridBoolColumn)
myGridColumn.AllowNull = False
End Sub 'SetAllowNull
[C#]
private void SetAllowNull(){
DataGridBoolColumn myGridColumn = (DataGridBoolColumn)dataGrid1.TableStyles[0].GridColumnStyles[0];
myGridColumn.AllowNull = false;
}
[C++]
private:
void SetAllowNull(){
DataGridBoolColumn* myGridColumn =
dynamic_cast<DataGridBoolColumn*>(dataGrid1->TableStyles->Item[0]->GridColumnStyles->Item[0]);
myGridColumn->AllowNull = false;
}
[JScript] JScript のサンプルはありません。Visual Basic、C#、および C++ のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン
をクリックします。
必要条件
プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ
参照
DataGridBoolColumn クラス | DataGridBoolColumn メンバ | System.Windows.Forms 名前空間 | AllowDBNull | NullValue | Value