Back to Devexpress

GridOptionsPrint.AllowMultilineHeaders Property

windowsforms-devexpress-dot-xtragrid-dot-views-dot-grid-dot-gridoptionsprint-9c845241.md

latest3.3 KB
Original Source

GridOptionsPrint.AllowMultilineHeaders Property

Gets or sets whether text is wrapped in the print/export output if it contains newline characters.

Namespace : DevExpress.XtraGrid.Views.Grid

Assembly : DevExpress.XtraGrid.v25.2.dll

NuGet Packages : DevExpress.Win.Grid, DevExpress.Win.Navigation

Declaration

csharp
[DefaultValue(false)]
[XtraSerializableProperty]
public virtual bool AllowMultilineHeaders { get; set; }
vb
<DefaultValue(False)>
<XtraSerializableProperty>
Public Overridable Property AllowMultilineHeaders As Boolean

Property Value

TypeDefaultDescription
Booleanfalse

true if text is wrapped in the print/export output if it contains newline characters; otherwise, false.

|

Property Paths

You can access this nested property as listed below:

Object TypePath to AllowMultilineHeaders
GridView

.OptionsPrint .AllowMultilineHeaders

|

Remarks

You can include newline characters in column headers and band headers using the “\n” escape sequence in C#, and the VbCrLf constant in Visual Basic. By default, the AllowMultilineHeaders property is set to false and as a result, newline characters are ignored when the grid is printed/exported. For newlines to be in effect in the print/export output, set the AllowMultilineHeaders property to true.

Note

By default, column and band headers are not auto enlarged to fit multi-line text. You can make the header panels bigger using the GridView.ColumnPanelRowHeight and BandedGridView.BandPanelRowHeight properties, respectively.

See Also

PrintHeader

GridBand.Caption

GridColumn.Caption

ColumnPanelRowHeight

BandPanelRowHeight

GridOptionsPrint Class

GridOptionsPrint Members

DevExpress.XtraGrid.Views.Grid Namespace