Skip to main content
All docs
V24.2
Row

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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