Back to Devexpress

PivotGridField.GrandTotalCellFormat Property

wpf-devexpress-dot-xpf-dot-pivotgrid-dot-pivotgridfield-97773d76.md

latest2.7 KB
Original Source

PivotGridField.GrandTotalCellFormat Property

Gets or sets the string used to format grand total values. This is a dependency property.

Namespace : DevExpress.Xpf.PivotGrid

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

NuGet Package : DevExpress.Wpf.PivotGrid

Declaration

csharp
public string GrandTotalCellFormat { get; set; }
vb
Public Property GrandTotalCellFormat As String

Property Value

TypeDescription
String

A string used to format grand total values.

|

Remarks

This property allows you to format values using the format strings described in the Standard Numeric Format Strings, Custom Numeric Format Strings, Standard Date and Time Format Strings and Custom Date and Time Format Strings topics in MSDN.

To learn more, see Standard Formatting.

Example

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

The result of the code is shown below:

xaml
<dxpg:PivotGridControl.Fields>
    <dxpg:PivotGridField Area="DataArea" FieldName="Extended_Price" CellFormat="c0"/>
    <dxpg:PivotGridField Area="RowArea" FieldName="OrderDate" GroupInterval="Date" ValueFormat="D"/>
    <dxpg:PivotGridField Area="ColumnArea" FieldName="Country"/>  
</dxpg:PivotGridControl.Fields>

See Also

TotalCellFormat

PivotGridField Class

PivotGridField Members

DevExpress.Xpf.PivotGrid Namespace