DataGridTextBoxColumn.EnterNullValue Method

Definition

Enters a Value in the column.

protected internal override void EnterNullValue();

Examples

The following example tests a DataGridColumnStyle to determine its column type. If the column is a DataGridTextBoxColumn, and the DataColumn allows null values, then the NullText property is set and the EnterNullValue method invoked.

Public Class Form1: Inherits Form

Protected dataGrid1 As DataGrid


Private Sub SetNullText()
   Dim dgeCol As MyGridColumn
   ' Assumes a column named Status exists.
   dgeCol = CType(DataGrid1.TableStyles("Customers"). _
   GridColumnStyles("Status"), MyGridColumn)
   dgeCol.EnterNull
End Sub

End Class

Public Class MyGridColumn
Inherits DataGridTextBoxColumn
   Public Sub EnterNull()
      me.EnterNullValue
   End Sub
End Class

Remarks

Enters the NullText value into the cell.

Applies to

Product Versions
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0

See also