DataGridViewAdvancedCellBorderStyle DataGridViewAdvancedCellBorderStyle DataGridViewAdvancedCellBorderStyle DataGridViewAdvancedCellBorderStyle Enum

Definition

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
Inheritance
DataGridViewAdvancedCellBorderStyleDataGridViewAdvancedCellBorderStyleDataGridViewAdvancedCellBorderStyleDataGridViewAdvancedCellBorderStyle

Fields

Inset Inset Inset Inset 3

A single-line sunken border.

InsetDouble InsetDouble InsetDouble InsetDouble 4

A double-line sunken border.

None None None None 1

No borders.

NotSet NotSet NotSet NotSet 0

The border is not set.

Outset Outset Outset Outset 5

A single-line raised border.

OutsetDouble OutsetDouble OutsetDouble OutsetDouble 6

A double-line raised border.

OutsetPartial OutsetPartial OutsetPartial OutsetPartial 7

A single-line border containing a raised portion.

Single Single Single Single 2

A single-line border.

Examples

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
{
    get
    {
        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
    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

Remarks

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

Applies to

See also