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 (PropertyDescriptor)

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

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

Parameters

prop
The PropertyDescriptor associated with the column.

Remarks

The TBD derives from DataGridColumn, and it must therefore be associated with a TBD. As implied by the class name, the System.WinForms.DataGridColumn.DataType of the DataColumn should be set to Boolean.

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.

[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 | DataGridBoolColumn Constructor Overload List | DataGrid | DataGridColumn | GridColumnsCollection | DataColumn