DataGridViewHeaderBorderStyle Enumeration
.NET Framework (current version)
Specifies the border style that can be applied to the ColumnHeadersBorderStyle and RowHeadersBorderStyle properties of a DataGridView control.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
| Member name | Description | |
|---|---|---|
| Custom | A border that has been customized. | |
| None | No borders. | |
| Raised | A three-dimensional raised border. | |
| Single | A single-line border. | |
| Sunken | A three-dimensional sunken border. |
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; }
.NET Framework
Available since 2.0
Available since 2.0
Show: