DataGridBoolColumn.EnterNullValue Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Enters a Value into the column.
protected public:
override void EnterNullValue();
protected internal override void EnterNullValue ();
override this.EnterNullValue : unit -> unit
Protected Friend Overrides Sub EnterNullValue ()
Exceptions
Examples
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 = dynamic_cast<MyDataGridBoolColumn^>(dataGrid1->TableStyles[ 0 ]->GridColumnStyles[ 2 ]);
colBool->CallEnterNullValue();
}
internal:
// Class derived from DataGridBoolColumn.
ref class MyDataGridBoolColumn: public DataGridBoolColumn
{
public:
void CallEnterNullValue()
{
this->EnterNullValue();
}
};
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();
}
}
Private Sub EnterNull()
' Creates an instance of a class derived from DataGridBoolColumn.
Dim colBool As MyDataGridBoolColumn
colBool = CType(dataGrid1.TableStyles(0).GridColumnStyles(2), MyDataGridBoolColumn)
colBool.CallEnterNullValue()
End Sub
' Class derived from DataGridBoolColumn.
Friend Class MyDataGridBoolColumn
Inherits DataGridBoolColumn
Public Sub CallEnterNullValue()
Me.EnterNullValue()
End Sub
End Class
Remarks
To set the actual value used when entering a null value, use the NullValue property.
Applies to
See also
Samarbeta med oss på GitHub
Källan för det här innehållet finns på GitHub, där du även kan skapa och granska ärenden och pull-begäranden. Se vår deltagarguide för mer information.