Skip to main content

How to: Specify Custom Styles for Pivot Grid Elements

  • 2 minutes to read

The following example demonstrates how to override a style applied to pivot grid field headers.

To do this, we assign a custom style that targets the TextEdit control to the PivotGridControl.FieldHeaderContentStyle property. This style specifies the display text format, foreground color and mouse pointer type for field headers.

The following image shows the result:


View Example

Imports System.Windows
Imports DXPivotGrid_OverrideElementStyles.DataSet1TableAdapters

Namespace DXPivotGrid_OverrideElementStyles
    Partial Public Class MainWindow
        Inherits Window

        Private salesPersonDataAdapter As New SalesPersonTableAdapter()
        Public Sub New()
            pivotGridControl1.DataSource = salesPersonDataAdapter.GetData()
        End Sub
    End Class
End Namespace