PivotGridControl.CustomDrawEmptyArea Event
Enables a Pivot Grid Control’s background to be custom painted.
Namespace: DevExpress.XtraPivotGrid
Assembly: DevExpress.XtraPivotGrid.v24.2.dll
NuGet Package: DevExpress.Win.PivotGrid
#Declaration
public event PivotCustomDrawEventHandler CustomDrawEmptyArea
#Event Data
The CustomDrawEmptyArea event's data class is PivotCustomDrawEventArgs. The following properties provide information specific to this event:
Property | Description |
---|---|
Appearance | Gets the painted element’s appearance settings. |
Bounds | Gets the bounding rectangle of the painted element. |
Graphics | Gets an object used to paint an element. |
Graphics |
Gets an object which specifies the storage for the most used pens, fonts and brushes. |
Handled | Gets or sets whether an event was handled, if it was handled the default actions are not required. |
Thread |
Gets an event parameter that provides thread-safe access to event data. |
The event data class exposes the following methods:
Method | Description |
---|---|
Default |
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.