[Expand]General Information
[Collapse]WinForms Controls
  .NET Core Support
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications, and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Property Grid
  [Collapse]Pivot Grid
   [Expand]Getting Started
   [Expand]Binding to Data
   [Collapse]Data Shaping
     Data Formatting
   [Expand]Data Analysis
   [Expand]Focus and Navigation
   [Expand]Printing and Exporting
   [Expand]Design-Time Features
   [Expand]UI Elements
   [Expand]End-User Capabilities
   [Expand]Member Tables
  [Expand]Tree List
  [Expand]Gantt Control
  [Expand]Chart Control
  [Expand]Map Control
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Sunburst Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Data Formatting

PivotGridControl uses a standard formatting mechanism to format displayed values. Refer to Formatting Values for more information on DevExpress WinForms data-aware controls.

The PivotGridControl formats values using the culture specified in the application by default. For instance, the images below demonstrate the same Pivot Grid whose date-time and summary values are formatted as "en-US" or "de-DE".

You can change default formatting settings for data cells, field values, totals and grand totals using the following properties:

Member Description
PivotGridFieldBase.CellFormat Provides access to the format settings applied to cells.
PivotGridFieldBase.GrandTotalCellFormat Provides access to the format settings applied to grand total values.
PivotGridFieldBase.TotalCellFormat Provides access to the format settings applied to total cells.
PivotGridFieldBase.TotalValueFormat Provides access to the format settings applied to the total header.
PivotGridFieldBase.ValueFormat Provides access to the format settings applied to field values.

Expanded Example

The following example shows how to format OrderDate field values and summaries corresponding to the Extended Price field. OrderDate field values are formatted using a long date pattern while Extended Price summaries are formatted as integer currency values.

Refer to the Standard Numeric Format Strings topic for detailed information about the standard numeric format specifiers.

The result of the code is shown below:

Expanded See Also

Is this topic helpful?​​​​​​​