System.Windows.Forms.DataGridView.ColumnHeadersBorderStyle Property

Gets the border style applied to the column headers.


public DataGridViewHeaderBorderStyle ColumnHeadersBorderStyle { set; get; }


Documentation for this section has not yet been entered.


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.


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.


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