DataGridBoolColumn.EnterNullValue Method ()

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Use BaseTrue

Enters a Value into the column.

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

protected internal override void EnterNullValue()

Exception Condition
Exception

The AllowNull property is set to false.

To set the actual value used when entering a null value, use the NullValue property.

The following code example uses the EnterNullValue to enter a null value into the column.

private void EnterNull() {
   // Creates an instance of a class derived from DataGridBoolColumn.
   MyDataGridBoolColumn colBool;
   colBool = (MyDataGridBoolColumn)dataGrid1.TableStyles[0].GridColumnStyles[2];
   colBool.CallEnterNullValue();
}

// Class derived from DataGridBoolColumn.
internal class MyDataGridBoolColumn : DataGridBoolColumn {

   public void CallEnterNullValue() {
      this.EnterNullValue();
   }
}

.NET Framework
Available since 1.1
Return to top
Show: