Back to Devexpress

PivotGridControl.CustomDrawEmptyArea Event

windowsforms-devexpress-dot-xtrapivotgrid-dot-pivotgridcontrol-d4425872.md

latest3.6 KB
Original Source

PivotGridControl.CustomDrawEmptyArea Event

Enables a Pivot Grid Control’s background to be custom painted.

Namespace : DevExpress.XtraPivotGrid

Assembly : DevExpress.XtraPivotGrid.v25.2.dll

NuGet Package : DevExpress.Win.PivotGrid

Declaration

csharp
public event PivotCustomDrawEventHandler CustomDrawEmptyArea
vb
Public Event CustomDrawEmptyArea As PivotCustomDrawEventHandler

Event Data

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

PropertyDescription
AppearanceGets the painted element’s appearance settings.
BoundsGets the bounding rectangle of the painted element.
GraphicsGets an object used to paint an element.
GraphicsCacheGets an object which specifies the storage for the most used pens, fonts and brushes.
HandledGets or sets whether an event was handled, if it was handled the default actions are not required.
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.

Remarks

Handle the CustomDrawEmptyArea event to custom paint the Pivot Grid Control’s empty area. This is the area which isn’t occupied by any rows. Set the event parameter’s PivotCustomDrawEventArgs.Handled property to true to disable default background painting. The other properties of the event parameter provide you with all the necessary information to paint the background.

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 PivotCustomDrawEventArgs.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

PivotGridControl Class

PivotGridControl Members

DevExpress.XtraPivotGrid Namespace