Back to Devexpress

WorksheetView.GridlineColor Property

officefileapi-devexpress-dot-spreadsheet-dot-worksheetview-d8bea449.md

latest2.1 KB
Original Source

WorksheetView.GridlineColor Property

Specifies the color of worksheet gridlines.

Namespace : DevExpress.Spreadsheet

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

NuGet Package : DevExpress.Spreadsheet.Core

Declaration

csharp
Color GridlineColor { get; set; }
vb
Property GridlineColor As Color

Property Value

TypeDescription
Color

The gridline color.

|

Exceptions

TypeDescription
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:

csharp
workbook.Worksheets[0].ActiveView.GridlineColor = Color.Blue;
vb
workbook.Worksheets(0).ActiveView.GridlineColor = Color.Blue

The image below demonstrates the result.

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

See Also

WorksheetView Interface

WorksheetView Members

DevExpress.Spreadsheet Namespace