[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Collapse]WPF Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Expand]MVVM Framework
 [Collapse]Controls and Libraries
   Reporting
  [Collapse]Data Grid
   [Expand]Getting Started
   [Expand]Implementation Details
   [Expand]Views
   [Expand]Grid View Data Layout
   [Expand]Binding to Data
   [Expand]Master-Detail Data Representation
   [Expand]Data Editing and Validation
   [Expand]Grouping
   [Expand]Selection
   [Expand]Filtering and Searching
   [Expand]Sorting
   [Expand]Data Summaries
   [Expand]Paging and Scrolling
   [Expand]Focus and Navigation
   [Expand]Conditional Formatting
   [Expand]Drag-and-Drop
   [Collapse]Appearance Customization
     Styles and Templates Overview
     Grid Control Styles
     Grid Elements That Support Templates
     Choosing Templates Based on Custom Logic
     Cell Merging
    [Expand]Column Header Customization
   [Expand]MVVM Enhancements
   [Expand]Printing and Exporting
   [Expand]End-User Interaction
   [Expand]Miscellaneous
   [Expand]Performance Improvement
   [Expand]Design-Time Features
   [Expand]Visual Elements
   [Expand]End-User Capabilities
   [Expand]Examples
  [Expand]Ribbon, Bars and Menu
  [Expand]Charts Suite
  [Expand]Pivot Grid
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Tree List
  [Expand]Gauge Controls
  [Expand]Map Control
  [Expand]Layout Management
  [Expand]Windows Modern UI
  [Expand]Printing-Exporting
  [Expand]Data Editors
  [Expand]Navigation Controls
  [Expand]Spell Checker
  [Expand]Property Grid
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Gantt Control
  [Expand]Diagram Control
  [Expand]Windows and Utility Controls
   Dialogs, Notifications and Panels
  [Expand]Scheduler (legacy)
 [Expand]Scaffolding Wizard
 [Expand]Localization
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Grid Elements That Support Templates

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

Expanded 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

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

Expanded MVVM Enhancements

Expanded Print Templates

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

Is this topic helpful?​​​​​​​