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!

DataColumn.Caption

Gets or sets the caption for this column.

[Visual Basic]
Public Property Caption As String
[C#]
public string Caption {get; set;}
[C++]
public: __property String* get_Caption();
public: __property void set_Caption(String*);
[JScript]
public function get Caption() : String;
public function set Caption(String);

Property Value

The caption of the column. If not set, returns the ColumnName value.

Remarks

The Caption value becomes visible in controls that support its display. For example, the System.WinForms.DataGrid control is capable of displaying captions for each column.

The OnPropertyChanged event occurs when the property is successfully changed.

Example [Visual Basic]

The following example creates a new DataColumn and adds it to a ColumnsCollection.

[Visual Basic]

Dim myColumn As DataColumn = DataColumn
myColumn = New DataColumn("fName")
' Set a different Caption.
myColumn.ColumnName = "First Name"

See Also

DataColumn Class | DataColumn Members | System.Data Namespace | ColumnName