Back to Devexpress

PivotGridControl.CustomDrawFieldHeader Event

windowsforms-devexpress-dot-xtrapivotgrid-dot-pivotgridcontrol-871568b0.md

latest5.4 KB
Original Source

PivotGridControl.CustomDrawFieldHeader Event

Enables field headers to be painted manually.

Namespace : DevExpress.XtraPivotGrid

Assembly : DevExpress.XtraPivotGrid.v25.2.dll

NuGet Package : DevExpress.Win.PivotGrid

Declaration

csharp
public event PivotCustomDrawFieldHeaderEventHandler CustomDrawFieldHeader
vb
Public Event CustomDrawFieldHeader As PivotCustomDrawFieldHeaderEventHandler

Event Data

The CustomDrawFieldHeader event's data class is PivotCustomDrawFieldHeaderEventArgs. The following properties provide information specific to this event:

PropertyDescription
AppearanceGets the painted element’s appearance settings. Inherited from PivotCustomDrawEventArgs.
BoundsGets the bounding rectangle of the painted element. Inherited from PivotCustomDrawEventArgs.
FieldGets the field whose header is to be painted.
GraphicsGets an object used to paint an element. Inherited from PivotCustomDrawEventArgs.
GraphicsCacheGets an object which specifies the storage for the most used pens, fonts and brushes. Inherited from PivotCustomDrawEventArgs.
HandledGets or sets whether an event was handled, if it was handled the default actions are not required. Inherited from PivotCustomDrawEventArgs.
InfoGets an object which provides the information required to paint a field header.
PainterGets the painter object that provides the default element painting mechanism.
ThreadSafeArgsGets an event parameter that provides thread-safe access to event data.

The event data class exposes the following methods:

MethodDescription
DefaultDraw()Performs default painting of an element. Inherited from PivotCustomDrawEventArgs.

Remarks

The CustomDrawFieldHeader event is raised before a field header is painted. Its event parameter provides all the information required to paint a cell. The field whose header is currently being processed is identified by the event parameter’s PivotCustomDrawFieldHeaderEventArgs.Field property. The PivotCustomDrawCellEventArgs.Handled property must be set to true to prohibit the default cell painting.

Important Note : custom drawing of any kind is ignored when printing PivotGridControl.

To access event data while an asynchronous operation is being performed, use a thread-safe event parameter returned by the PivotCustomDrawFieldHeaderEventArgs.ThreadSafeArgs property. To learn more, see Asynchronous Mode.

Important

Do not change cell values, modify the control’s layout, or change the control’s object model in the events used for custom control painting. Actions that update the layout can cause the control to malfunction.

See Also

CustomDrawCell

CustomDrawEmptyArea

CustomDrawFieldHeaderArea

CustomDrawFieldValue

PivotGridControl Class

PivotGridControl Members

DevExpress.XtraPivotGrid Namespace