Skip to main content

BaseColumn.HeaderCaption Property

Gets the column header’s caption. This is a dependency property.

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v24.2.Core.dll

NuGet Package: DevExpress.Wpf.Grid.Core

Declaration

public object HeaderCaption { get; }

Property Value

Type Description
Object

An object that represents the column header’s caption.

Remarks

The main part of a header’s content is the caption. You can change this caption and add different elements to the header content.

ColumnHeaderCustomizationContent

Specify the BaseColumn.Header property to change the header caption. If the BaseColumn.Header property is not specified, the header caption is specified by the ColumnBase.FieldName property. Camel-case field names are split with spaces, for example, the header for the “CategoryName” field name is “Category Name”.

The following code sample demonstrates how to use the Header property:

ColumnHeaderCustomizationHeader

<dxg:GridColumn FieldName="CategoryName" 
                Header="Category" 
                HorizontalHeaderContentAlignment="Center"/>

You can use the HeaderCaption property to obtain the actual column header caption.

Refer to the following help topic for more information: Header Content Customization.

See Also