Skip to main content

DataViewBase.ColumnHeaderCustomizationAreaTemplate Property

Gets or sets the template that defines the presentation of the customization area displayed within column headers. This is a dependency property.

Namespace: DevExpress.Xpf.Grid

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

NuGet Package: DevExpress.Wpf.Grid.Core


public DataTemplate ColumnHeaderCustomizationAreaTemplate { get; set; }

Property Value

Type Description

A DataTemplate object that defines the presentation of the customization area displayed within column headers.


The image below shows a grid column header’s customization area containing a checkbox:


Specify the ColumnBase.HeaderCustomizationAreaTemplate property to add an element to a column header’s customization area. Use the ColumnHeaderCustomizationAreaTemplate property to display the customization area’s content within all column headers in the current GridControl’s view. The data context (binding source) for these templates is the ColumnBase class.

The following code sample demonstrates how to add a checkbox to the column header using the ColumnBase.HeaderCustomizationAreaTemplate property:

<dxg:GridColumn FieldName="CategoryName">
         <dxe:CheckEdit IsChecked="{Binding Column.ReadOnly, Mode=TwoWay}" />

View Example: Display a Check Box in Column Headers

Use the ColumnBase.ActualHeaderCustomizationAreaTemplateSelector property to obtain the actual template selector.

If you have more than one template for rendering a customization area, specify the ColumnBase.HeaderCustomizationAreaTemplateSelector property to implement custom logic for selecting the required template.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ColumnHeaderCustomizationAreaTemplate property.


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.

See Also