DataGridTextBoxColumn.EnterNullValue DataGridTextBoxColumn.EnterNullValue DataGridTextBoxColumn.EnterNullValue DataGridTextBoxColumn.EnterNullValue Method

定義

Value を列に入力します。Enters a Value in the column.

protected public:
 override void EnterNullValue();
protected internal override void EnterNullValue ();
override this.EnterNullValue : unit -> unit
Protected Friend Overrides Sub EnterNullValue ()

次の例ではDataGridColumnStyle 、をテストして列の型を決定します。The following example tests a DataGridColumnStyle to determine its column type. DataGridTextBoxColumnがでnull DataColumn 、で値がNullText許可されている場合は、プロパティが設定EnterNullValueされ、メソッドが呼び出されます。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
      

注釈

セルにNullText値を入力します。Enters the NullText value into the cell.

適用対象

こちらもご覧ください