WinForms Pivot Grid - Change the Field Value Header Background
This example handles the CustomDrawFieldValue event to fill the header's color.
Files to Review
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 thePainter
object'sDrawObject()
method.