Skip to main content
All docs
V24.2
Row

WorksheetView.GridlineColor Property

Specifies the color of worksheet gridlines.

Namespace: DevExpress.Spreadsheet

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

NuGet Package: DevExpress.Spreadsheet.Core

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