DataGridViewAdvancedCellBorderStyle Enumeration
Specifies the border styles that can be applied to the cells of a DataGridView control.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
| Member name | Description | |
|---|---|---|
| NotSet | The border is not set. | |
| None | No borders. | |
| Single | A single-line border. | |
| Inset | A single-line sunken border. | |
| InsetDouble | A double-line sunken border. | |
| Outset | A single-line raised border. | |
| OutsetDouble | A double-line raised border. | |
| OutsetPartial | A single-line border containing a raised portion. |
The AdvancedCellBorderStyle property of the DataGridView control returns an object of type DataGridViewAdvancedBorderStyle, which has properties of type DataGridViewAdvancedCellBorderStyle.
The following code example demonstrates how to override the DataGridView.AdjustedTopLeftHeaderBorderStyle property to customize the borders of the upper-left cell. This code example is part of a larger example provided for the DataGridViewAdvancedBorderStyle class.
Public Overrides ReadOnly Property AdjustedTopLeftHeaderBorderStyle() _ As DataGridViewAdvancedBorderStyle Get Dim newStyle As New DataGridViewAdvancedBorderStyle() With newStyle .Top = DataGridViewAdvancedCellBorderStyle.None .Left = DataGridViewAdvancedCellBorderStyle.None .Bottom = DataGridViewAdvancedCellBorderStyle.Outset .Right = DataGridViewAdvancedCellBorderStyle.OutsetDouble End With Return newStyle End Get End Property
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.