System.Windows.Forms.DataGridViewColumn.HeaderText Property

Gets or sets the caption text on the column's header cell.

Syntax

[System.ComponentModel.Localizable(true)]
public string HeaderText { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

This property is useful only when the column has an associated header cell. For more information, see the DataGridViewBand.HeaderCellCore property.

Note:

There is no corresponding header text property for rows. To display labels in row headers, you must handle the DataGridView.CellPainting event and paint your own labels when DataGridViewCellPaintingEventArgs.ColumnIndex is -1.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0