System.Windows.Forms.DataGridViewCellBorderStyle Enumeration

Specifies the border styles that can be applied to the cells of a System.Windows.Forms.DataGridView control.

Syntax

public enum DataGridViewCellBorderStyle

Remarks

The DataGridView.CellBorderStyle property of the System.Windows.Forms.DataGridView control uses the System.Windows.Forms.DataGridViewCellBorderStyle enumeration. To draw borders only between the rows, specify DataGridViewCellBorderStyle.SingleHorizontal, DataGridViewCellBorderStyle.SunkenHorizontal or DataGridViewCellBorderStyle.RaisedHorizontal. To draw borders only between the columns, specify DataGridViewCellBorderStyle.SingleVertical, DataGridViewCellBorderStyle.SunkenVertical or DataGridViewCellBorderStyle.RaisedVertical. To draw borders between the rows and columns, specify DataGridViewCellBorderStyle.Single DataGridViewCellBorderStyle.Sunken or DataGridViewCellBorderStyle.Raised.

Members

Member NameDescription
Custom

A border that has been customized.

None

No borders.

Raised

A three-dimensional raised border.

RaisedHorizontal

A horizontal three-dimensional raised border.

RaisedVertical

A vertical three-dimensional raised border.

Single

A single line border.

SingleHorizontal

A horizontal single-line border.

SingleVertical

A vertical single-line border.

Sunken

A three-dimensional sunken border.

SunkenHorizontal

A horizontal three-dimensional sunken border.

SunkenVertical

A vertical three-dimensional sunken border.

Requirements

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