NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

DataGridTextBoxColumn.EnterNullValue

Enters a a null reference (in Visual Basic Nothing) in the column.

[Visual Basic]
Overrides Public Sub EnterNullValue()
[C#]
public override void EnterNullValue();
[C++]
public: override void EnterNullValue();
[JScript]
public override function EnterNullValue();

Remarks

Enters the NullText value into the cell.

Example [Visual Basic]

The following example tests a DataGridColumn to determine its column type. If the column is a TBD, and the DataColumn allows a null reference (Nothing) values, then the NullText property is set and the EnterNullValue method invoked.

[Visual Basic]

Private Sub SetNullText()
   Dim dgeCol As DataGridTextBoxColumn
   ' Assuming a column named Status exists....
   Set dgeCol = DataGrid1.GridColumns("Status")
   If dgeCol.ToString = "DataGridTextBoxColumn" And dgeCol.DataColumn.AllowNull Then
      ' The NullText property is usually set in an initialization procedure.
      dgeCol.NullText = "Null Text"
      dgeCol.EnterNullValue
   End If
End Sub

See Also

DataGridTextBoxColumn Class | DataGridTextBoxColumn Members | System.WinForms Namespace | Abort | Commit | Edit | NullText