Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

DataGridView::AdjustColumnHeaderBorderStyle Method (DataGridViewAdvancedBorderStyle^, DataGridViewAdvancedBorderStyle^, Boolean, Boolean)

 

Adjusts the DataGridViewAdvancedBorderStyle for a column header cell of a DataGridView that is currently being painted.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public:
virtual DataGridViewAdvancedBorderStyle^ AdjustColumnHeaderBorderStyle(
	DataGridViewAdvancedBorderStyle^ dataGridViewAdvancedBorderStyleInput,
	DataGridViewAdvancedBorderStyle^ dataGridViewAdvancedBorderStylePlaceholder,
	bool isFirstDisplayedColumn,
	bool isLastVisibleColumn
)

Parameters

dataGridViewAdvancedBorderStyleInput
Type: System.Windows.Forms::DataGridViewAdvancedBorderStyle^

A DataGridViewAdvancedBorderStyle that that represents the column header border style to modify.

dataGridViewAdvancedBorderStylePlaceholder
Type: System.Windows.Forms::DataGridViewAdvancedBorderStyle^

A DataGridViewAdvancedBorderStyle that is used to store intermediate changes to the column header border style.

isFirstDisplayedColumn
Type: System::Boolean

true to indicate that the DataGridViewCell that is currently being painted is in the first column displayed on the DataGridView; otherwise, false.

isLastVisibleColumn
Type: System::Boolean

true to indicate that the DataGridViewCell that is currently being painted is in the last column in the DataGridView that has the Visible property set to true; otherwise, false.

Return Value

Type: System.Windows.Forms::DataGridViewAdvancedBorderStyle^

A DataGridViewAdvancedBorderStyle that represents the border style for the current column header.

The DataGridView control internally calls the AdjustColumnHeaderBorderStyle method to determine the appearance of the borders for the column header cells. The DataGridView control typically uses the value of the AdvancedColumnHeadersBorderStyle property for the dataGridViewAdvancedBorderStyleInput parameter.

Notes to Inheritors:

Override this method if you want to customize the appearance of the border on column header cells.

The following code example demonstrates how to override the AdjustColumnHeaderBorderStyle method to customize the borders of the column header cells. This code example is part of a larger example provided for the DataGridViewAdvancedBorderStyle class.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 2.0
Return to top
Show:
© 2017 Microsoft