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();
When you create an instance of a DataGridColumn, the following properties are initialized.
Property | Default Value |
---|---|
Alignment | HorizontalAlignment.Left |
AlternatingBackColor | System.Drawing.Color.Empty |
BackColor | System.Drawing.Color.Empty |
DataGridTable | a null reference (in Visual Basic Nothing) |
Font | a null reference (Nothing) |
FontHeight | -1 |
ForeColor | System.Drawing.Color.Empty |
ForeColor | a null reference (Nothing) |
Header | An empty string (""). |
Invalidate | false |
NullText | The string "(null)." |
ReadOnly | false |
The following example creates a variable for a DataGridColumn and sets the variable to an existing column in the DataGrid control.
[Visual Basic]
Private Sub SetDataGridColumn() Dim dgc As DataGridColumn Set dgc = DataGrid1.GridColumns(1) Debug.Print dgc.DataColumn.ColumnName End Sub
DataGridColumn Class | DataGridColumn Members | System.WinForms Namespace | DataGridColumn Constructor Overload List | DataColumn | DataGrid