DataGridViewHeaderBorderStyle Enum
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Specifies the border style that can be applied to the ColumnHeadersBorderStyle and RowHeadersBorderStyle properties of a DataGridView control.
public enum class DataGridViewHeaderBorderStyle
public enum DataGridViewHeaderBorderStyle
type DataGridViewHeaderBorderStyle =
Public Enum DataGridViewHeaderBorderStyle
- Inheritance
Fields
Custom | 0 | A border that has been customized. |
None | 4 | No borders. |
Raised | 2 | A three-dimensional raised border. |
Single | 1 | A single-line border. |
Sunken | 3 | A three-dimensional sunken border. |
Examples
The following code example illustrates the use of this type. For more information, see How to: Change the Border and Gridline Styles in the Windows Forms DataGridView Control.
private void SetBorderAndGridlineStyles()
{
this.dataGridView1.GridColor = Color.BlueViolet;
this.dataGridView1.BorderStyle = BorderStyle.Fixed3D;
this.dataGridView1.CellBorderStyle =
DataGridViewCellBorderStyle.None;
this.dataGridView1.RowHeadersBorderStyle =
DataGridViewHeaderBorderStyle.Single;
this.dataGridView1.ColumnHeadersBorderStyle =
DataGridViewHeaderBorderStyle.Single;
}
Private Sub SetBorderAndGridlineStyles()
With Me.dataGridView1
.GridColor = Color.BlueViolet
.BorderStyle = BorderStyle.Fixed3D
.CellBorderStyle = DataGridViewCellBorderStyle.None
.RowHeadersBorderStyle = _
DataGridViewHeaderBorderStyle.Single
.ColumnHeadersBorderStyle = _
DataGridViewHeaderBorderStyle.Single
End With
End Sub
Applies to
See also
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기