System.Data.DataColumn.ColumnName Property

Gets or sets the name of the column in the System.Data.DataColumnCollection.

Syntax

[System.ComponentModel.DefaultValue("")]
[System.ComponentModel.RefreshProperties(System.ComponentModel.RefreshProperties.All)]
public string ColumnName { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

When a System.Data.DataColumn is created, it has no DataColumn.ColumnName value. However, when the System.Data.DataColumn is added to a System.Data.DataColumnCollection for a System.Data.DataTable object, it is given a default name ("Column1", "Column2", and so on).

By default, the DataColumn.Caption value is set to the DataColumn.ColumnName value.

Requirements

Namespace: System.Data
Assembly: System.Data (in System.Data.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0