Skip to main content
A newer version of this page is available. .
All docs
V20.2
.NET Framework 4.5.2+
Row

WorksheetView.GridlineColor Property

Specifies the color of worksheet gridlines.

Namespace: DevExpress.Spreadsheet

Assembly: DevExpress.Spreadsheet.v20.2.Core.dll

Declaration

Color GridlineColor { get; set; }

Property Value

Type Description
Color

The gridline color.

Exceptions

Type Description
ArgumentException

Occurs if you assign a transparent or semi-transparent color to the GridlineColor property. Only opaque colors are allowed.

Remarks

The following example changes the gridline color for the first worksheet in a workbook:

workbook.Worksheets[0].ActiveView.GridlineColor = Color.Blue;

The image below demonstrates the result.

A worksheet with blue gridlines

Set the GridlineColor property to Empty to restore the default gridline color. Disable the WorksheetView.ShowGridlines property to hide worksheet gridlines.

See Also