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!

DataGridBoolColumn Constructor

Initializes a new instance of the DataGridBoolColumn class.

Overload List

Initializes a new instance of the DataGridBoolColumn class.

[Visual Basic] Overloads Public Sub New()
[C#] public DataGridBoolColumn();
[C++] public: DataGridBoolColumn();
[JScript] public function DataGridBoolColumn();

Initializes a new instance of a TBD with the specified DataColumn.

[Visual Basic] Overloads Public Sub New(PropertyDescriptor)
[C#] public DataGridBoolColumn(PropertyDescriptor);
[C++] public: DataGridBoolColumn(PropertyDescriptor*);
[JScript] public function DataGridBoolColumn(PropertyDescriptor);

Example [Visual Basic]

The following example creates an instance of a TBD and associates it with a DataColumn through the System.WinForms.DataGridColumn.DataColumn property. The DataColumn object's DataType must be set to Boolean.

Note   This example shows how to use one of the overloaded version of the DataGridBoolColumn constructor. For other examples that may be available, see the individual overload topics.

[Visual Basic]

Private Sub AddBoolCol()
   Dim dc As New DataColumn
   Set dc.DataType = [Type].GetType("System.Boolean")
   dc.ColumnName = "NewBoolColumn"
   dc.DefaultValue = True
   ' Add the column to the DataGrid control's DataColumns collection.
   DataGrid1.GridTables.DataTable.Columns.Add dc
   ' Create a new DataGridBoolColumn.
   Dim boolCol As DataGridBoolColumn
   Set boolCol = New DataGridBoolColumn(dc)
   ' Add the column to the collection
   DataGrid1.GridColumns.Add boolCol
End Sub

See Also

DataGridBoolColumn Class | DataGridBoolColumn Members | System.WinForms Namespace