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

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