PivotGridControl.CustomCellAppearance Event
Allows you to specify brushes used to paint cells.
Namespace: DevExpress.Xpf.PivotGrid
Assembly: DevExpress.Xpf.PivotGrid.v14.2.dll
#Declaration
#Event Data
The CustomCellAppearance event's handler receives an argument of the PivotCustomCellAppearanceEventArgs type. The following properties provide information specific to this event:
Property | Description |
---|---|
Background | Gets or sets the brush used to paint the background of the processed cell. |
Column |
Gets the custom total to which the processed cell's column corresponds.
Inherited from Pivot |
Column |
Gets the innermost column field which corresponds to the processed cell.
Inherited from Pivot |
Column |
This member supports the internal infrastructure and is not intended to be used directly from your code.
Inherited from Pivot |
Column |
Gets the visual index of the column that contains the processed cell.
Inherited from Pivot |
Column |
Gets the type of the cell's column header.
Inherited from Pivot |
Data |
Gets the data field which identifies the column where the processed cell resides.
Inherited from Pivot |
Display |
Gets the display text of the cell currently being processed.
Inherited from Pivot |
Focused |
Gets whether the processed cell is the focused cell.
Inherited from Pivot |
Foreground | Gets or sets the brush used to paint the foreground of the processed cell. |
Handled |
Gets or sets a value that indicates the present state of the event handling for a routed event as it travels the route.
Inherited from Routed |
Is |
Gets or sets whether the pivot grid is being exported (or printed). |
Original |
Gets the original reporting source as determined by pure hit testing, before any possible Source adjustment by a parent class.
Inherited from Routed |
Routed |
Gets or sets the Routed |
Row |
Gets the custom total to which the processed cell's row corresponds.
Inherited from Pivot |
Row |
Gets the innermost row field which corresponds to the processed cell.
Inherited from Pivot |
Row |
This member supports the internal infrastructure and is not intended to be used directly from your code.
Inherited from Pivot |
Row |
Gets the visual index of the row that contains the processed cell.
Inherited from Pivot |
Row |
Gets the type of the cell's row header.
Inherited from Pivot |
Selected |
Gets whether the processed cell is selected.
Inherited from Pivot |
Source |
Gets or sets a reference to the object that raised the event.
Inherited from Routed |
Summary |
Gets the type of summary calculated in the current cell.
Inherited from Pivot |
Summary |
Gets the summary value currently being processed.
Inherited from Pivot |
Value |
Gets the processed cell's value.
Inherited from Pivot |
#Remarks
The CustomCellAppearance event is fired for each cell after the PivotGridControl layout changes.
This event allows you to specify brushes used to paint the background and foreground of the processed cell. To do this, use the event parameter's PivotCustomCellAppearanceEventArgs.Background and PivotCustomCellAppearanceEventArgs.Foreground properties, respectively.
Use the PivotCustomCellAppearanceEventArgs.IsExporting property to obtain whether the pivot grid is being exported (or printed). If the PivotCustomCellAppearanceEventArgs.IsExporting property returns true, brushes assigned to the PivotCustomCellAppearanceEventArgs.Background and PivotCustomCellAppearanceEventArgs.Foreground properties will affect the processed cell's export (or print) appearance. Otherwise, these brushes will affect the cell's display appearance.
The event parameter also provides properties used to identify the processed cell. Use the event parameter's PivotCellBaseEventArgs.ColumnField, PivotCellBaseEventArgs.DataField and PivotCellBaseEventArgs.RowField properties to obtain the column, data and row fields that correspond to the processed cell, respectively. The PivotCellBaseEventArgs.ColumnIndex and PivotCellBaseEventArgs.RowIndex properties are used to obtain the visual indexes of the column and row that contain the cell. To obtain the type of the column and row where the cell resides, use the PivotCellBaseEventArgs.ColumnValueType and PivotCellBaseEventArgs.RowValueType properties, respectively.
To specify brushes used to paint field value cells, handle the PivotGridControl.CustomValueAppearance event.