Skip to content

DevExpress-Examples/winforms-pivot-change-the-field-value-header-appearance-backcolor

21.2.3+
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
CS
 
 
VB
 
 
 
 
 
 
 
 
 
 
 
 

WinForms Pivot Grid - Change the Field Value Header Background

This example handles the CustomDrawFieldValue event to fill the header's color.

screenshot

Files to Review

Form1.cs (VB: Form1.vb)

Example Overview

Handle the PivotGridControl.CustomDrawFieldValue event to change the header's back color. You can customize fields headers in two ways:

  • To modify the appearance of the field header, use the e.Appearance property to get the appearance object for the painted element and change its background color.
  • To drow field headers manually, use the e.Painter property to get the Painter object and implement the default element painting mechanism. Pass the PivotHeaderObjectInfoArgs object (the e.Info property) to the Painter object's DrawObject() method.

Documentation

Custom Draw

More Examples