Skip to main content
All docs
V23.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.v23.2.dll

NuGet Package: 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