Skip to main content

PivotGridControl.CustomCellAppearance Event

Allows you to specify brushes used to paint cells.

Namespace: DevExpress.Xpf.PivotGrid

Assembly: DevExpress.Xpf.PivotGrid.v14.2.dll

#Declaration

public event PivotCustomCellAppearanceEventHandler CustomCellAppearance

#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.
ColumnCustomTotal Gets the custom total to which the processed cell's column corresponds. Inherited from PivotCellBaseEventArgs.
ColumnField Gets the innermost column field which corresponds to the processed cell. Inherited from PivotCellBaseEventArgs.
ColumnFieldIndex This member supports the internal infrastructure and is not intended to be used directly from your code. Inherited from PivotCellBaseEventArgs.
ColumnIndex Gets the visual index of the column that contains the processed cell. Inherited from PivotCellBaseEventArgs.
ColumnValueType Gets the type of the cell's column header. Inherited from PivotCellBaseEventArgs.
DataField Gets the data field which identifies the column where the processed cell resides. Inherited from PivotCellBaseEventArgs.
DisplayText Gets the display text of the cell currently being processed. Inherited from PivotCellBaseEventArgs.
Focused Gets whether the processed cell is the focused cell. Inherited from PivotCellBaseEventArgs.
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 RoutedEventArgs.
IsExporting Gets or sets whether the pivot grid is being exported (or printed).
OriginalSource Gets the original reporting source as determined by pure hit testing, before any possible Source adjustment by a parent class. Inherited from RoutedEventArgs.
RoutedEvent Gets or sets the RoutedEvent associated with this RoutedEventArgs instance. Inherited from RoutedEventArgs.
RowCustomTotal Gets the custom total to which the processed cell's row corresponds. Inherited from PivotCellBaseEventArgs.
RowField Gets the innermost row field which corresponds to the processed cell. Inherited from PivotCellBaseEventArgs.
RowFieldIndex This member supports the internal infrastructure and is not intended to be used directly from your code. Inherited from PivotCellBaseEventArgs.
RowIndex Gets the visual index of the row that contains the processed cell. Inherited from PivotCellBaseEventArgs.
RowValueType Gets the type of the cell's row header. Inherited from PivotCellBaseEventArgs.
Selected Gets whether the processed cell is selected. Inherited from PivotCellBaseEventArgs.
Source Gets or sets a reference to the object that raised the event. Inherited from RoutedEventArgs.
SummaryType Gets the type of summary calculated in the current cell. Inherited from PivotCellBaseEventArgs.
SummaryValue Gets the summary value currently being processed. Inherited from PivotCellBaseEventArgs.
Value Gets the processed cell's value. Inherited from PivotCellBaseEventArgs.

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

See Also