Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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