A newer version of this page is available. Switch to the current version.

PivotGridControl.CustomDrawFieldHeaderArea Event

Enables header areas to be painted manually.

Namespace: DevExpress.XtraPivotGrid

Assembly: DevExpress.XtraPivotGrid.v19.1.dll

Declaration

public event PivotCustomDrawHeaderAreaEventHandler CustomDrawFieldHeaderArea
Public Event CustomDrawFieldHeaderArea As PivotCustomDrawHeaderAreaEventHandler

Event Data

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

Property Description
Appearance Gets the painted element's appearance settings. Inherited from PivotCustomDrawEventArgs.
Area Gets a value which specifies the header area currently being painted.
Bounds Gets the bounding rectangle of the painted element. Inherited from PivotCustomDrawEventArgs.
Graphics Gets an object used to paint an element. Inherited from PivotCustomDrawEventArgs.
GraphicsCache Gets an object which specifies the storage for the most used pens, fonts and brushes. Inherited from PivotCustomDrawEventArgs.
Handled Gets or sets whether an event was handled, if it was handled the default actions are not required. Inherited from PivotCustomDrawEventArgs.
ThreadSafeArgs Gets an event parameter that provides thread-safe access to event data.

The event data class exposes the following methods:

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

Remarks

The CustomDrawFieldHeaderArea event is raised before the header area is painted and allows it to be painted manually. The event parameter provides all the information necessary to paint an area. The PivotCustomDrawHeaderAreaEventArgs.Area property identifies the header area currently being painted.

Set the PivotCustomDrawEventArgs.Handled property to true to prohibit the default area painting.

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

NOTE

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

IMPORTANT

Never change cell values or modify the control's layout on this event, or any other event designed to tune the control's appearance. Any action that causes a layout update can cause the control to malfunction.

See Also