wpf-6770-controls-and-libraries-data-grid-appearance-customization-grid-elements-that-support-templates.md
This topic contains information about template properties introduced by the GridControl.
The following table lists template properties that define the appearance of the GridControl visual elements:
|
Visual Element
|
Property
|
Description
|
Unoptimized Mode Data Context (Binding Source)
|
Optimized Mode Data Context (Binding Source)
| | --- | --- | --- | --- | --- | |
Data Row
|
TableView.DataRowTemplateSelector
|
Defines the presentation of data rows.
|
|
| |
TableView.DefaultDataRowTemplate
|
Not supported in optimized mode.
| |
Tree List Node
|
TreeListView.DataRowTemplateSelector
|
Defines the presentation of tree list nodes.
|
|
| |
TreeListView.DefaultDataRowTemplate
|
Not supported in optimized mode.
| |
Data Cell
|
DataViewBase.CellTemplateSelector
ColumnBase.CellTemplateSelector
|
Defines the presentation of data cells.
|
|
| |
Cell Editor
|
ColumnBase.CellDisplayTemplate
|
Specifies a control template that displays column values.
|
Note
It is advised that you use RelativeSource.TemplatedParent. See examples attached to property documentation.
| |
|
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.HeaderTemplateSelector
DataViewBase.ColumnHeaderTemplate
DataViewBase.ColumnHeaderTemplateSelector
ColumnBase.FilterEditorHeaderTemplate
|
Defines the presentation of column headers.
|
|
| |
ColumnBase.HeaderCustomizationAreaTemplate
ColumnBase.HeaderCustomizationAreaTemplateSelector
DataViewBase.ColumnHeaderCustomizationAreaTemplate
DataViewBase.ColumnHeaderCustomizationAreaTemplateSelector
|
Defines the presentation of column headers.
|
|
| |
DataViewBase.ColumnHeaderToolTipTemplate
|
Defines the presentation of a column header‘s tooltip.
|
|
| |
Card Header
|
CardView.CardHeaderTemplateSelector
|
Defines the presentation of card headers.
|
|
| |
Card
|
|
Defines the presentation of cards.
|
|
| |
Card Row
|
CardView.CardRowTemplateSelector
|
Defines the presentation of card rows.
|
|
| |
Group Row
|
GridViewBase.GroupValueTemplate
GridColumn.GroupValueTemplateSelector
GridViewBase.GroupValueTemplateSelector
|
Defines the presentation of group rows.
|
|
| |
GridViewBase.GroupRowTemplateSelector
|
Defines the presentation of group rows.
|
|
| |
Band Column Header
|
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
|
TreeListView.RowDetailsTemplate
TableView.RowDetailsTemplateSelector
TreeListView.RowDetailsTemplateSelector
|
Defines the presentation of row details.
|
Supported in optimized mode only.
|
| |
Row Indicator
|
TableView.RowIndicatorContentTemplate
|
Defines the presentation of the row indicator.
|
|
| |
TreeListView.RowIndicatorContentTemplate
|
|
| |
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.
|
|
| |
Total Summary Item
|
DataViewBase.TotalSummaryItemTemplate
DataViewBase.TotalSummaryItemTemplateSelector
|
Defines the presentation of total summary items.
|
|
| |
Edit Form
|
|
Defines the presentation of the edit form.
|
|
| |
|
|
| |
|
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
|
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 define the appearance of 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 |
| Group Row | GridViewBase.PrintGroupRowTemplate | Defines the presentation of group rows when the grid is printed. | GroupRowData |
| 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 |