Skip to main content
A newer version of this page is available. .

Grid Elements That Support Templates

  • 5 minutes to read

This topic contains information about template properties introduced by the GridControl.

Common Templates

The following table lists template properties that define the appearance of the GridControl‘s visual elements.

Visual Element

Property

Description

Unoptimized Mode Data Context (Binding Source)

Optimized Mode Data Context (Binding Source)

Data Row

TableView.DataRowTemplate

TableView.DataRowTemplateSelector

Defines the presentation of data rows.

RowData

RowData

TableView.DefaultDataRowTemplate

Not supported in optimized mode.

Tree List Node

TreeListView.DataRowTemplate

TreeListView.DataRowTemplateSelector

Defines the presentation of tree list nodes.

TreeListRowData

TreeListRowData

TreeListView.DefaultDataRowTemplate

Not supported in optimized mode.

Data Cell

DataViewBase.CellTemplate

ColumnBase.CellTemplate

DataViewBase.CellTemplateSelector

ColumnBase.CellTemplateSelector

Defines the presentation of data cells.

EditGridCellData

EditGridCellData

Cell Editor

ColumnBase.DisplayTemplate

Specifies a control template that displays column values.

EditGridCellData

Note

It is advised that you use RelativeSource.TemplatedParent. See examples attached to property documentation.

ColumnBase.EditTemplate

Specifies a control template that displays a custom editor used to edit column values.

ColumnBase.AutoFilterRowDisplayTemplate

Specifies a control template that displays a column’s value within the auto filter row.

ColumnBase.AutoFilterRowEditTemplate

Specifies a control template that displays a custom editor used to edit a column’s value within the auto filter row.

Column Header

BaseColumn.HeaderTemplate

BaseColumn.HeaderTemplateSelector

DataViewBase.ColumnHeaderTemplate

DataViewBase.ColumnHeaderTemplateSelector

ColumnBase.FilterEditorHeaderTemplate

Defines the presentation of column headers.

BaseColumn.HeaderCaption

BaseColumn.HeaderCaption

ColumnBase.HeaderCustomizationAreaTemplate

ColumnBase.HeaderCustomizationAreaTemplateSelector

DataViewBase.ColumnHeaderCustomizationAreaTemplate

DataViewBase.ColumnHeaderCustomizationAreaTemplateSelector

Defines the presentation of column headers.

GridColumn

GridColumn

DataViewBase.ColumnHeaderToolTipTemplate

Defines the presentation of a column header‘s tooltip.

BaseColumn.HeaderToolTip

BaseColumn.HeaderToolTip

Card Header

CardView.CardHeaderTemplate

CardView.CardHeaderTemplateSelector

Defines the presentation of card headers.

CardHeaderData

CardHeaderData

Card

CardView.CardTemplate

CardView.CardTemplateSelector

Defines the presentation of cards.

CardData

CardData

Card Row

CardView.CardRowTemplate

CardView.CardRowTemplateSelector

Defines the presentation of card rows.

GridCellData

GridCellData

Group Row

GridColumn.GroupValueTemplate

GridViewBase.GroupValueTemplate

GridColumn.GroupValueTemplateSelector

GridViewBase.GroupValueTemplateSelector

Defines the presentation of group rows.

GridColumnData

GridColumnData

GridViewBase.GroupRowTemplate

GridViewBase.GroupRowTemplateSelector

Defines the presentation of group rows.

GroupRowData

GroupRowData

Band Column Header

TableView.BandHeaderTemplate

TreeListView.BandHeaderTemplate

TableView.BandHeaderTemplateSelector

TreeListView.BandHeaderTemplateSelector

Defines the presentation of the band column‘s header.

DevExpress.Xpf.Grid.GridControlBand.Header

DevExpress.Xpf.Grid.GridControlBand.Header

Row Details

TableView.RowDetailsTemplate

TreeListView.RowDetailsTemplate

TableView.RowDetailsTemplateSelector

TreeListView.RowDetailsTemplateSelector

Defines the presentation of the row’s details.

Supported in optimized mode only.

RowData

Row Indicator

TableView.RowIndicatorContentTemplate

Defines the presentation of the row indicator.

RowData

RowData

TreeListView.RowIndicatorContentTemplate

TreeListRowData

TreeListRowData

Detail’s Content

DetailDescriptorBase.ContentTemplate

Defines the presentation of the detail‘s content.

An object from the data source.

An object from the data source.

Detail’s Header

DetailDescriptorBase.HeaderContentTemplate

Defines the presentation of the detail‘s header.

Refer to the DetailDescriptorBase.HeaderContentTemplate property documentation.

Group Summary Item

GridViewBase.DefaultGroupSummaryItemTemplate

GridViewBase.GroupSummaryItemTemplate

GridViewBase.GroupSummaryItemTemplateSelector

Defines the presentation of summary items displayed within group rows.

GridGroupSummaryData

GridGroupSummaryData

Total Summary Item

DataViewBase.TotalSummaryItemTemplate

DataViewBase.TotalSummaryItemTemplateSelector

Defines the presentation of total summary items.

GridColumnData

GridColumnData

Edit Form

TableView.EditFormTemplate

Defines the presentation of the edit form.

RowData

RowData

TreeListView.EditFormTemplate

TreeListRowData

TreeListRowData

ColumnBase.EditFormTemplate

Defines the presentation of the column’s editor within the edit form.

DevExpress.Xpf.Grid.EditForm.EditFormCellData

DevExpress.Xpf.Grid.EditForm.EditFormCellData

Column Filter Popup

ColumnBase.CustomColumnFilterPopupTemplate

Defines the presentation of the column filter dropdown.

Use RelativeSource.TemplatedParent. See example attached to property documentation.

Focused Cell Border

DataViewBase.FocusedCellBorderTemplate

Defines the presentation of the focused cell’s border.

No data context

No data context

Focused Row Border

TableView.FocusedRowBorderTemplate

Defines the presentation of the focused row’s border.

No data context

No data context

MVVM Enhancements

The following table lists template properties that you can use to implement the MVVM pattern. To learn more, see MVVM Enhancements.

Visual Element

Property

Description

Data Context (Binding Source)

Data Column

DataControlBase.ColumnGeneratorTemplate

DataControlBase.ColumnGeneratorTemplateSelector

BandBase.ColumnGeneratorTemplate

BandBase.ColumnGeneratorTemplateSelector

Defines data columns.

Refer to the Binding to a Collection of Columns topic.

Format Condition

TableView.FormatConditionGeneratorTemplate

TableView.FormatConditionGeneratorTemplateSelector

Defines conditional formatting rules.

Refer to the Binding to a Collection of Conditional Formatting Rules topic.

Band Column

BandBase.BandGeneratorTemplate

BandBase.BandGeneratorTemplateSelector

DataControlBase.BandGeneratorTemplate

DataControlBase.BandGeneratorTemplateSelector

Defines band columns.

Refer to the Binding to a Collection of Bands topic.

Total Summaries

DataControlBase.TotalSummaryGeneratorTemplate

Defines total summary items.

Refer to the Binding to Total and Group Summaries topic.

Group Summaries

GridControl.GroupSummaryGeneratorTemplate

Defines summary items displayed within group rows.

Refer to the Binding to Total and Group Summaries topic.

The following table lists templates that represent visual elements when the grid is printed.

Visual Element Property Description Data Context (Binding Source)
Data Row TableView.PrintRowTemplate Defines the presentation of data rows when the grid is printed. RowData
Tree List Node TreeListView.PrintRowTemplate Defines the presentation of tree list nodes when the tree list is printed. TreeListRowData
Card CardView.PrintCardTemplate Defines the presentation of cards when the grid is printed. RowData
Card Header CardView.PrintCardHeaderTemplate Defines the presentation of card headers when the grid is printed. CardHeaderData
Card Content CardView.PrintCardContentTemplate Defines the presentation of individual values in the card values area when the grid is printed. EditGridCellData
Card Row CardView.PrintCardRowTemplate Defines the presentation of card rows when the grid is printed. RowData
Card Row Indent CardView.PrintCardRowIndentTemplate Defines the presentation of the indent around the row of grouped cards when the grid is printed. RowData
Column Header DataViewBase.PrintHeaderTemplate Defines the presentation of column headers when the grid is printed. GridColumnData
Group Footer TableView.PrintGroupFooterTemplate Defines the presentation of group footers when the grid is printed. DevExpress.Xpf.Grid.GroupSummaryRowData
Summary Panel DataViewBase.PrintFooterTemplate Defines the presentation of summary panel when the grid is printed. GridColumnData
Fixed Total Summary Panel DataViewBase.PrintFixedFooterTemplate Defines the presentation of fixed summary panel when the grid is printed. GridColumnData