Initializes a new instance of the DataGridColumn class.
In a derived class, initializes a new instance of the DataGridColumn class.
[Visual Basic] Overloads Public Sub New()
[C#] public DataGridColumn();
[C++] public: DataGridColumn();
[JScript] public function DataGridColumn();
Initializes a new instance of the DataGridColumn class with the specified DataColumn.
[Visual Basic] Overloads Public Sub New(PropertyDescriptor)
[C#] public DataGridColumn(PropertyDescriptor);
[C++] public: DataGridColumn(PropertyDescriptor*);
[JScript] public function DataGridColumn(PropertyDescriptor);
The following example creates a variable for a DataGridColumn and sets the variable to an existing column in the TBD control using a specified DataColumn.
Note This example shows how to use one of the overloaded version of the DataGridColumn constructor. For other examples that may be available, see the individual overload topics.
[Visual Basic]
Private Sub SetDataGridColumnByColumn() Dim dc As DataColumn Dim dgc As DataGridColumn ' Set the DataColumn variable. Set dc = DataGrid1.DataGridTable.DataTable.Columns("Fname") ' Set the DataGridColumn variable using the DataColumn reference. Set dgc = DataGrid1.GridColumns(dc) ' Confirm it's the same column by printing the ColumnName. Debug.Print dgc.DataColumn.ColumnName End Sub
DataGridColumn Class | DataGridColumn Members | System.WinForms Namespace