System.Windows.Forms.DataGridView.ColumnHeadersBorderStyle Property

Gets the border style applied to the column headers.

Syntax

[System.ComponentModel.DefaultValue(System.Windows.Forms.DataGridViewHeaderBorderStyle.Raised)]
[System.ComponentModel.Browsable(true)]
public DataGridViewHeaderBorderStyle ColumnHeadersBorderStyle { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

If the DataGridView.ColumnHeadersBorderStyle property is set to anything other than DataGridViewHeaderBorderStyle.Single, the DataGridView.GridColor property must be a system color.

You cannot set this property to the DataGridViewHeaderBorderStyle.Custom value, which is a read-only value indicating that the border style has been customized through the use of the DataGridView.AdvancedColumnHeadersBorderStyle property.

Note:

If visual styles are enabled for the application through the Application.EnableVisualStyles method and the DataGridView.EnableHeadersVisualStyles property is true, the column headers are painted using the current theme. In this case, the value of the DataGridView.ColumnHeadersBorderStyle property is ignored for all column headers except the DataGridView.TopLeftHeaderCell, to which the theme is not applied.

Requirements

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