DataGridViewAdvancedCellBorderStyle Enum


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

public enum class DataGridViewAdvancedCellBorderStyle
public enum DataGridViewAdvancedCellBorderStyle
type DataGridViewAdvancedCellBorderStyle = 
Public Enum DataGridViewAdvancedCellBorderStyle


Inset 3

A single-line sunken border.

InsetDouble 4

A double-line sunken border.

None 1

No borders.

NotSet 0

The border is not set.

Outset 5

A single-line raised border.

OutsetDouble 6

A double-line raised border.

OutsetPartial 7

A single-line border containing a raised portion.

Single 2

A single-line border.


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 override DataGridViewAdvancedBorderStyle AdjustedTopLeftHeaderBorderStyle
        DataGridViewAdvancedBorderStyle newStyle =
            new DataGridViewAdvancedBorderStyle();
        newStyle.Top = DataGridViewAdvancedCellBorderStyle.None;
        newStyle.Left = DataGridViewAdvancedCellBorderStyle.None;
        newStyle.Bottom = DataGridViewAdvancedCellBorderStyle.Outset;
        newStyle.Right = DataGridViewAdvancedCellBorderStyle.OutsetDouble;
        return newStyle;
Public Overrides ReadOnly Property AdjustedTopLeftHeaderBorderStyle() _
    As DataGridViewAdvancedBorderStyle
        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


The AdvancedCellBorderStyle property of the DataGridView control returns an object of type DataGridViewAdvancedBorderStyle, which has properties of type DataGridViewAdvancedCellBorderStyle.

Applies to

See also