Skip to main content

Grid Control Styles

  • 4 minutes to read

This topic describes styles that define the presentation of GridControl‘s visual elements. Use this information to create custom styles.

Important

GridControl‘s optimized mode uses special styles and templates for some elements. To learn more, see Optimized Mode and Optimized Mode Styles and Templates.

This topic contains the following sections.

Common Styles

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

Visual Element

Property

Description

Target Element

Data Context (Binding Source)

Auto Filter Row

ColumnBase.AutoFilterRowCellStyle

TableView.AutoFilterRowCellStyle

TreeListView.AutoFilterRowCellStyle

Specifies the style applied to auto filter row cells.

DevExpress.Xpf.Grid.FilterCellContentPresenter

DevExpress.Xpf.Grid.EditGridCellData

New Item Row

TableView.NewItemRowCellStyle

Specifies the style applied to new item row cells.

Unoptimized mode: DevExpress.Xpf.Grid.NewItemRowCellContentPresenter

Optimized mode: DevExpress.Xpf.Grid.LightweightNewItemCellEditor

DevExpress.Xpf.Grid.EditGridCellData

Card

CardView.CardStyle

Specifies the style applied to cards.

ContentControl

CardData

Column Header

BaseColumn.HeaderStyle

Specifies the style applied to column headers.

GridColumnHeader

GridColumn

ColumnBase.ColumnHeaderContentStyle

DataViewBase.ColumnHeaderContentStyle

Specifies the style applied to column header‘s content.

DevExpress.Xpf.Grid.HeaderContentControl

Data Cell

ColumnBase.CellStyle

DataViewBase.CellStyle

Specify styles applied to data cells.

Unoptimized mode: CellContentPresenter

Optimized mode: DevExpress.Xpf.Grid.LightweightCellEditor

DevExpress.Xpf.Grid.EditGridCellData

Data Row

TableView.RowStyle

Specifies the style applied to data rows.

Unoptimized mode: GridRowContent

Optimized mode: RowControl

RowData

Tree List Node

TreeListView.RowStyle

Specifies the style applied to tree list nodes.

Group Row

GridViewBase.GroupRowStyle

GridViewBase.GroupValueContentStyle

Specify styles applied to group rows.

Unoptimized mode: System.Windows.Controls.ContentControl

Optimized mode: DevExpress.Xpf.Grid.GroupRowControl

GroupRowData

Group Footer

TableView.GroupFooterRowStyle

Specifies the style applied to group footers.

DevExpress.Xpf.Grid.FooterContentPresenter

DevExpress.Xpf.Grid.GroupSummaryRowData

Group Summary Item (Group Row)

GridViewBase.GroupSummaryContentStyle

Specifies the style applied to group summary items.

Unoptimized mode: System.Windows.Controls.Border

Not supported in optimized mode.

DevExpress.Xpf.Grid.GridGroupSummaryData

TableView.GroupBandSummaryContentStyle

Specifies the style applied to group summary items aligned by bands.

DevExpress.Xpf.Grid.GroupBandSummaryControl

DevExpress.Xpf.Grid.GridGroupSummaryColumnData

TableView.GroupColumnSummaryContentStyle

Specifies the style applied to group summary items aligned by columns.

DevExpress.Xpf.Grid.GroupColumnSummaryControl

GridSummaryItem.GroupColumnSummaryElementStyle

Specifies the style applied to individual text elements in the group summary item that is displayed within the group row and aligned by a column.

System.Windows.Documents.Run

DevExpress.Xpf.Grid.GridSummaryDisplayData

GridViewBase.GroupColumnSummaryElementStyle

Specifies the style applied to individual text elements in group summary items that are aligned by columns.

Group Summary Item (Group Footer)

GridSummaryItem.GroupColumnFooterElementStyle

Specifies the style applied to individual text elements in the group summary item that is displayed within the group footer.

System.Windows.Documents.Run

DevExpress.Xpf.Grid.GridSummaryDisplayData

TableView.GroupColumnFooterElementStyle

Specifies the style applied to individual text elements in the group summary item that is displayed within the group footer.

TableView.GroupFooterSummaryContentStyle

Specifies the style applied to group summary items displayed within group footers.

DevExpress.Xpf.Core.DataContentPresenter

DevExpress.Xpf.Grid.GridGroupSummaryColumnData

Total Summary Item

ColumnBase.TotalSummaryContentStyle

Specifies the style applied to total summary items displayed within the column.

DevExpress.Xpf.Grid.TotalSummaryContentPresenter

GridColumnData

DataViewBase.TotalSummaryContentStyle

Specifies the style applied to total summary items displayed within the view.

SummaryItemBase.TotalSummaryElementStyle

Specifies the style applied to individual text elements of a total summary item.

System.Windows.Documents.Run

DevExpress.Xpf.Grid.GridSummaryDisplayData

DataViewBase.TotalSummaryElementStyle

Specifies the style applied to individual text elements of all total summary items within the view.

Fixed Total Summary

SummaryItemBase.FixedTotalSummaryElementStyle

DataViewBase.FixedTotalSummaryElementStyle

Specify styles applied to fixed total summaries.

System.Windows.Documents.Run

DevExpress.Xpf.Grid.GridSummaryDisplayData

Selection Rectangle

DataViewBase.SelectionRectangleStyle

Specifies the style applied to the selection rectangle.

System.Windows.Controls.Border

Same as the view’s

Wait Indicator

DataViewBase.WaitIndicatorStyle

Specifies the style applied to the wait indicator.

DevExpress.Xpf.Core.WaitIndicator

Same as the view’s

MVVM Enhancements

The following table lists style properties that specify the appearance of columns and bands described in the view model. To learn more, see MVVM Enhancements.

Visual Element Property Description Target Element Data Context (Binding Source)
Data Column DataControlBase.ColumnGeneratorStyle Specifies a style for all columns generated using templates. GridColumn Refer to the Binding to a Collection of Columns topic.
BandBase.ColumnGeneratorStyle Specifies a style for all columns within a band generated using templates.
Band Column DataControlBase.BandGeneratorStyle Specifies a style for all bands generated using templates. GridControlBand Refer to the Binding to a Collection of Bands topic.
BandBase.BandGeneratorStyle Specifies a style for all child bands within the current band that were generated using templates.

Printing Styles

The following table contains the styles applied to visual elements when the grid is printed.

Visual Element

Property

Description

Target Element

Data Context (Binding Source)

Data Cell

ColumnBase.PrintCellStyle

DataViewBase.PrintCellStyle

Specify styles applied to data cells when the grid is printed.

TextEdit

RowData

Column Header

ColumnBase.PrintColumnHeaderStyle

TableView.PrintColumnHeaderStyle

TreeListView.PrintColumnHeaderStyle

Specify styles applied to column headers when the grid is printed.

TextEdit

BaseColumn.HeaderCaption

Group Row

GridViewBase.PrintGroupRowStyle

Specifies the style applied to group rows when the grid is printed.

TextEdit

GroupRowData

Group Footer

TableView.PrintGroupFooterStyle

Specifies style applied to group footers when the grid is printed.

Control

DevExpress.Xpf.Grid.GroupSummaryRowData

Total Summary Item

ColumnBase.PrintTotalSummaryStyle

DataViewBase.PrintTotalSummaryStyle

Specify styles applied to total summary items when the grid is printed.

TextEdit

GridColumn

Fixed Total Summary Item

DataViewBase.PrintFixedTotalSummaryStyle

Specifies style applied to fixed summary items when the grid is printed.

TextEdit

GridColumn

Band Header

BandBase.PrintBandHeaderStyle

TableView.PrintBandHeaderStyle

TreeListView.PrintBandHeaderStyle

Specify styles applied to band column headers when the grid is printed.

TextEdit

GridColumnData

See Also