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.

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

Remarks

The TBD inherits from the DataGridColumn class.

Example [Visual Basic]

The following example creates a DataColumn with a DataType set to Boolean, and adds it to the columns collection of a TBD control. The code then creates a new DataGridBoolColumn, and assigns its System.WinForms.DataGridBoolColumn.DataColumn property to the new TBD object. The code finally adds the TBD object to the TBD collection of a DataGrid control.

[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 New DataGridBoolColumn
   ' Assign its DataColumn property to the new DataColumn.
   Set boolCol.DataColumn = dc
   ' Add the column to the collection
   DataGrid1.GridColumns.Add boolCol
End Sub

See Also

DataGridBoolColumn Class | DataGridBoolColumn Members | System.WinForms Namespace | DataGridBoolColumn Constructor Overload List | DataGrid | DataGridColumn | GridColumnsCollection | DataColumn