Gets or sets the text of the column header.
[Visual Basic] Overridable Public Property Header As String [C#] public string Header {virtual get; virtual set;} [C++] public: __property virtual String* get_Header(); public: __property virtual void set_Header(String*); [JScript] public function get Header() : String; public function set Header(String);
A string that displayed as the column header. The default value is the underlying DataColumn object's Caption property.
Other properties for setting the text displayed by a column header include the DataColumn class's ColumnName and Caption properties.
The following example sets the Header property to the Caption property of a DataColumn.
[Visual Basic]
Dim dgCol As DataGridColumn Set dgCol = DataGrid1.GridColumns(0) dgCol.Header = dgCol.DataColumn.Caption
DataGridColumn Class | DataGridColumn Members | System.WinForms Namespace | ColumnName | Caption