System.Windows.Forms.ListView.HeaderStyle Property

Gets or sets the column header style.

Syntax

[System.ComponentModel.DefaultValue(System.Windows.Forms.ColumnHeaderStyle.Clickable)]
public ColumnHeaderStyle HeaderStyle { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

The ListView.HeaderStyle property allows you to specify the type of column headers to display when the ListView.View property of the System.Windows.Forms.ListView control is set to View.Details and the System.Windows.Forms.ListView control has System.Windows.Forms.ColumnHeader objects specified in the System.Windows.Forms.ListView.ColumnHeaderCollection. System.Windows.Forms.ColumnHeader objects define the columns that are displayed in the System.Windows.Forms.ListView control. Each column is used to display subitem information for each item in the System.Windows.Forms.ListView.

The ListView.HeaderStyle property allows you to specify whether the column headers are visible or, if they are visible, whether they will function as clickable buttons. If the ListView.HeaderStyle property is set to ColumnHeaderStyle.None, the column headers are not displayed, although the items and subitems of the System.Windows.Forms.ListView control are still arranged in columns. If the ListView.HeaderStyle property is set to ColumnHeaderStyle.Clickable, the column headers act like buttons that users can click to carry out an action, such as sorting the items in the System.Windows.Forms.ListView control using the items in the clicked column as a key. You can implement this behavior in a handler for the ListView.ColumnClick event. If the ListView.HeaderStyle property is set to ColumnHeaderStyle.Nonclickable, the column headers appear, but cannot be clicked.

Requirements

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