Skip to main content
Row

WorksheetPrintOptions.PrintHeadings Property

Gets or sets whether row and column headings are printed.

Namespace: DevExpress.Spreadsheet

Assembly: DevExpress.Spreadsheet.v24.1.Core.dll

NuGet Package: DevExpress.Spreadsheet.Core

Declaration

bool PrintHeadings { get; set; }

Property Value

Type Description
Boolean

true, to print row and column headings; otherwise, false.

Property Paths

You can access this nested property as listed below:

Object Type Path to PrintHeadings
Worksheet
.PrintOptions .PrintHeadings

Remarks

Use the PrintHeadings property to specify whether or not row and column headings should be printed. To control the visibility of row and column headings in the worksheet view, use the WorksheetView.ShowHeadings property of the object that is returned by Worksheet.ActiveView.

Example

This example demonstrates how to specify print options.

Note

The WorksheetPrintOptions.Draft, WorksheetPrintOptions.NumberOfCopies and WorksheetPrintOptions.CommentsPrintMode options are not supported when you print a document from the Spreadsheet. However, they are saved to a file, so you can use Microsoft® Excel® or another spreadsheet application to load and print a document.

View Example

worksheet.ActiveView.Orientation = PageOrientation.Landscape;
// Display row and column headings.
worksheet.ActiveView.ShowHeadings = true;
worksheet.ActiveView.PaperKind = DevExpress.Drawing.Printing.DXPaperKind.A4;
// Access an object that contains print options.
WorksheetPrintOptions printOptions = worksheet.PrintOptions;
// Do not print gridlines.
printOptions.PrintGridlines = false;
// Scale the print area to fit to the width of two pages.
printOptions.FitToPage = true;
printOptions.FitToWidth = 2;
// Print in black and white.
printOptions.BlackAndWhite = true;
// Print a dash instead of a cell error message.
printOptions.ErrorsPrintMode = ErrorsPrintMode.Dash;
See Also