Back to Devexpress

SpreadsheetViewOptions.ShowColumnHeaders Property

officefileapi-devexpress-dot-xtraspreadsheet-dot-spreadsheetviewoptions-5a69f687.md

latest2.8 KB
Original Source

SpreadsheetViewOptions.ShowColumnHeaders Property

Gets or sets a value indicating whether column headers are displayed in the SpreadsheetControl.

Namespace : DevExpress.XtraSpreadsheet

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

NuGet Package : DevExpress.Spreadsheet.Core

Declaration

csharp
[DefaultValue(true)]
public bool ShowColumnHeaders { get; set; }
vb
<DefaultValue(True)>
Public Property ShowColumnHeaders As Boolean

Property Value

TypeDefaultDescription
Booleantrue

true , to display column headers; otherwise, false.

|

Property Paths

You can access this nested property as listed below:

Object TypePath to ShowColumnHeaders
SpreadsheetControlOptions

.View .ShowColumnHeaders

|

Remarks

The following examples demonstrate how to hide the column and row headers in the SpreadsheetControl:

csharp
spreadsheetControl.Options.View.ShowColumnHeaders = false;
spreadsheetControl.Options.View.ShowRowHeaders = false;
vb
spreadsheetControl.Options.View.ShowColumnHeaders = False
spreadsheetControl.Options.View.ShowRowHeaders = False

This property value is not saved to a workbook. It only specifies how a document is displayed in the SpreadsheetControl.

To specify whether to show or hide column and row headers in a particular worksheet, use the WorksheetView.ShowHeadings property. Note that if you load a document with worksheets whose headers are hidden, neither column or row headers will be displayed, regardless of the SpreadsheetControl’s view options.

See Also

How to: Show and Hide Row and Column Headings

SpreadsheetViewOptions Class

SpreadsheetViewOptions Members

DevExpress.XtraSpreadsheet Namespace