Skip to main content
A newer version of this page is available. .
All docs
V20.2

CustomizePivotCellEventArgs.Formatting Property

Gets or sets the object that defines the cell’s format (font, alignment, background color, format string, etc.)

Namespace: DevExpress.Xpf.PivotGrid

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

NuGet Packages: DevExpress.WindowsDesktop.Wpf.PivotGrid, DevExpress.Wpf.PivotGrid

Declaration

public XlFormattingObject Formatting { get; set; }

Property Value

Type Description
XlFormattingObject

The XlFormattingObject object that defines the cell’s format.

Remarks

The following code snippet changes the background color of the “Category Name” column in the output document:

//...
void op_CustomizeCell(CustomizePivotCellEventArgs e){
      if (e.ValueItemInfo != null && e.ValueItemInfo.Field == fieldCategoryName) 
      {
          e.Formatting.BackColor = Color.AliceBlue;
          e.Handled = true;
      } 
  }
See Also