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 | Defines the presentation of data rows. | |||
Not supported in optimized mode. | ||||
Tree List Node | Defines the presentation of tree list nodes. | |||
Not supported in optimized mode. | ||||
Data Cell | Defines the presentation of data cells. | |||
Cell Editor | 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. | ||||
Specifies a control template that displays a column’s value within the auto filter row. | ||||
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 | Defines the presentation of column headers. | ||
ColumnBase.HeaderCustomizationAreaTemplate ColumnBase.HeaderCustomizationAreaTemplateSelector | Defines the presentation of column headers. | |||
Defines the presentation of a column header‘s tooltip. | ||||
Card Header | Defines the presentation of card headers. | |||
Card | Defines the presentation of cards. | |||
Card Row | Defines the presentation of card rows. | |||
Group Row |
GridViewBase.GroupValueTemplate | Defines the presentation of group rows. | ||
Defines the presentation of group rows. | ||||
Band Column Header |
TreeListView.BandHeaderTemplate | Defines the presentation of the band column‘s header. | DevExpress.Xpf.Grid.GridControlBand.Header | DevExpress.Xpf.Grid.GridControlBand.Header |
Row Details |
TreeListView.RowDetailsTemplate | Defines the presentation of row details. | Supported in optimized mode only. | |
Row Indicator | Defines the presentation of the row indicator. | |||
Detail’s Content | Defines the presentation of the detail‘s content. | An object from the data source. | An object from the data source. | |
Detail’s Header | Defines the presentation of the detail‘s header. | Refer to the DetailDescriptorBase.HeaderContentTemplate property documentation. | ||
Group Summary Item | GridViewBase.DefaultGroupSummaryItemTemplate | Defines the presentation of summary items displayed within group rows. | ||
Total Summary Item | 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 | Defines the presentation of the column filter dropdown. | Use RelativeSource.TemplatedParent. See example attached to property documentation. | ||
Focused Cell Border | Defines the presentation of the focused cell’s border. | No data context | No data context | |
Focused Row Border | 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 | Defines data columns. | Refer to the Binding to a Collection of Columns topic. |
Format Condition | Defines conditional formatting rules. | Refer to the Binding to a Collection of Conditional Formatting Rules topic. | |
Band Column | BandBase.BandGeneratorTemplate BandBase.BandGeneratorTemplateSelector | Defines band columns. | Refer to the Binding to a Collection of Bands topic. |
Total Summaries | Defines total summary items. | Refer to the Binding to Total and Group Summaries topic. | |
Group Summaries | Defines summary items displayed within group rows. | Refer to the Binding to Total and Group Summaries topic. |
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 |
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 |