Back to Devexpress

WorksheetView.ShowHeadings Property

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

latest6.4 KB
Original Source

WorksheetView.ShowHeadings Property

Gets or sets whether row and column headers are visible on the worksheet.

Namespace : DevExpress.Spreadsheet

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

NuGet Package : DevExpress.Spreadsheet.Core

Declaration

csharp
bool ShowHeadings { get; set; }
vb
Property ShowHeadings As Boolean

Property Value

TypeDescription
Boolean

true , to display row and column headers; otherwise, false.

|

Remarks

The image below shows the appearance of the worksheet when row and column headers are shown, and when row and column headers are hidden (the workbook is opened in Microsoft® Excel®).

Example

Cells in a worksheet are arranged in rows (Worksheet.Rows) and columns (Worksheet.Columns). Each row and column has a unique name (rows use numbers “1”, “2”, “3”,…, “1048576”, and columns use letters “A”, “B”, “C”,…,”XFD”). Row and column names are displayed on a worksheet’s left and top side, respectively. Use the Worksheet.ActiveView.ShowHeadings (WorksheetView.ShowHeadings) property to control row and column headings’ visibility in a worksheet.

Note

Use the WorksheetPrintOptions.PrintHeadings property to specify whether row and column headings should appear in a printout. Refer to the How to: Specify Print Settings document for details on how to specify print options for a worksheet.

View Example

csharp
// Hide row and column headings in the first worksheet.
workbook.Worksheets[0].ActiveView.ShowHeadings = false;
vb
' Hide row and column headings in the first worksheet.
workbook.Worksheets(0).ActiveView.ShowHeadings = False

The following code snippets (auto-collected from DevExpress Examples) contain references to the ShowHeadings 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.

winforms-spreadsheetcontrol-api-part1/CS/SpreadsheetControl/SpreadsheetActions/WorksheetActions.cs#L120

csharp
// Hide row and column headings in the first worksheet.
workbook.Worksheets[0].ActiveView.ShowHeadings = false;
#endregion #ShowHideHeadings

wpf-spreadsheetcontrol-api-part-1/CS/SpreadsheetControl_WPF_API/SpreadsheetActions/WorksheetActions.cs#L139

csharp
// Hide row and column headings in the first worksheet.
workbook.Worksheets[0].ActiveView.ShowHeadings = false;
#endregion #ShowHideHeadings

spreadsheet-document-api-examples-part1/CS/SpreadsheetExamples/SpreadsheetActions/WorksheetActions.cs#L131

csharp
// Hide row and column headings in the first worksheet.
workbook.Worksheets[0].ActiveView.ShowHeadings = false;
#endregion #ShowHideHeadings

winforms-spreadsheetcontrol-api-part1/VB/SpreadsheetControl/SpreadsheetActions/WorksheetActions.vb#L122

vb
' Hide row and column headings in the first worksheet.
            workbook.Worksheets(0).ActiveView.ShowHeadings = False
' #End Region ' #ShowHideHeadings

wpf-spreadsheetcontrol-api-part-1/VB/SpreadsheetControl_WPF_API/SpreadsheetActions/WorksheetActions.vb#L126

vb
' Hide row and column headings in the first worksheet.
            workbook.Worksheets(0).ActiveView.ShowHeadings = False
' #End Region ' #ShowHideHeadings

spreadsheet-document-api-examples-part1/VB/SpreadsheetExamples/SpreadsheetActions/WorksheetActions.vb#L128

vb
' Hide row and column headings in the first worksheet.
            workbook.Worksheets(0).ActiveView.ShowHeadings = False
#End Region ' #ShowHideHeadings

See Also

PrintOptions

How to: Specify Print Settings

WorksheetView Interface

WorksheetView Members

DevExpress.Spreadsheet Namespace