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 | Specifies the style applied to auto filter row cells. | DevExpress.Xpf.Grid.FilterCellContentPresenter | DevExpress.Xpf.Grid.EditGridCellData |
New Item Row | 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 | Specifies the style applied to cards. | |||
Column Header | Specifies the style applied to column headers. | |||
Specifies the style applied to column header‘s content. | DevExpress.Xpf.Grid.HeaderContentControl | |||
Data Cell | Specify styles applied to data cells. | Unoptimized mode: CellContentPresenter Optimized mode: DevExpress.Xpf.Grid.LightweightCellEditor | DevExpress.Xpf.Grid.EditGridCellData | |
Data Row | Specifies the style applied to data rows. | Unoptimized mode: GridRowContent Optimized mode: RowControl | ||
Tree List Node | Specifies the style applied to tree list nodes. | |||
Group Row | Specify styles applied to group rows. | Unoptimized mode: System.Windows.Controls.ContentControl Optimized mode: DevExpress.Xpf.Grid.GroupRowControl | ||
Group Footer | Specifies the style applied to group footers. | DevExpress.Xpf.Grid.FooterContentPresenter | DevExpress.Xpf.Grid.GroupSummaryRowData | |
Group Summary Item (Group Row) | Specifies the style applied to group summary items. | Unoptimized mode: System.Windows.Controls.Border Not supported in optimized mode. | DevExpress.Xpf.Grid.GridGroupSummaryData | |
Specifies the style applied to group summary items aligned by bands. | DevExpress.Xpf.Grid.GroupBandSummaryControl | DevExpress.Xpf.Grid.GridGroupSummaryColumnData | ||
Specifies the style applied to group summary items aligned by columns. | DevExpress.Xpf.Grid.GroupColumnSummaryControl | |||
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 | ||
Specifies the style applied to individual text elements in group summary items that are aligned by columns. | ||||
Group Summary Item (Group Footer) | 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 | |
Specifies the style applied to individual text elements in the group summary item that is displayed within the group footer. | ||||
Specifies the style applied to group summary items displayed within group footers. | DevExpress.Xpf.Core.DataContentPresenter | DevExpress.Xpf.Grid.GridGroupSummaryColumnData | ||
Total Summary Item | Specifies the style applied to total summary items displayed within the column. | DevExpress.Xpf.Grid.TotalSummaryContentPresenter | ||
Specifies the style applied to total summary items displayed within the view. | ||||
Specifies the style applied to individual text elements of a total summary item. | System.Windows.Documents.Run | DevExpress.Xpf.Grid.GridSummaryDisplayData | ||
Specifies the style applied to individual text elements of all total summary items within the view. | ||||
Fixed Total Summary | Specify styles applied to fixed total summaries. | System.Windows.Documents.Run | DevExpress.Xpf.Grid.GridSummaryDisplayData | |
Selection Rectangle | Specifies the style applied to the selection rectangle. | System.Windows.Controls.Border | Same as the view’s | |
Wait Indicator | 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 | Specify styles applied to data cells when the grid is printed. | |||
Column Header | ColumnBase.PrintColumnHeaderStyle | Specify styles applied to column headers when the grid is printed. | ||
Group Row | Specifies the style applied to group rows when the grid is printed. | |||
Group Footer | Specifies style applied to group footers when the grid is printed. | DevExpress.Xpf.Grid.GroupSummaryRowData | ||
Total Summary Item | Specify styles applied to total summary items when the grid is printed. | |||
Fixed Total Summary Item | Specifies style applied to fixed summary items when the grid is printed. | |||
Band Header | Specify styles applied to band column headers when the grid is printed. |