Skip to main content

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

SpreadsheetViewOptions.ShowColumnHeaders Property

Gets or sets a value indicating whether column headers are displayed in the SpreadsheetControl. This is a dependency property.

Namespace: DevExpress.Xpf.Spreadsheet

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

NuGet Package: DevExpress.Wpf.Spreadsheet

#Declaration

public bool ShowColumnHeaders { get; set; }

#Property Value

Type Description
Boolean

true, to display column headers; otherwise, false.

#Property Paths

You can access this nested property as listed below:

Object Type Path to ShowColumnHeaders
SpreadsheetControlOptions
.View .ShowColumnHeaders

#Remarks

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

  • In XAML:

    <dxsps:SpreadsheetControl x:Name="spreadsheetControl">
        <dxsps:SpreadsheetControl.Options>
            <dxsps:SpreadsheetControlOptions>
                <dxsps:SpreadsheetControlOptions.View>
                    <dxsps:SpreadsheetViewOptions ShowColumnHeaders="False" ShowRowHeaders="False"/>
                </dxsps:SpreadsheetControlOptions.View>
            </dxsps:SpreadsheetControlOptions>
        </dxsps:SpreadsheetControl.Options>
    </dxsps:SpreadsheetControl>
    
  • In code-behind:

    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.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ShowColumnHeaders property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also