Back to Devexpress

DxPivotTableField.CellFormat Property

blazor-devexpress-dot-blazor-dot-pivottable-dot-dxpivottablefield-bc409373.md

latest1.9 KB
Original Source

DxPivotTableField.CellFormat Property

Specifies the display format for data cells.

Namespace : DevExpress.Blazor.PivotTable

Assembly : DevExpress.Blazor.PivotTable.v25.2.dll

NuGet Package : DevExpress.Blazor.PivotTable

Declaration

csharp
[Parameter]
public string CellFormat { get; set; }

Property Value

TypeDescription
String

The display format.

|

Remarks

Refer to the following topic for additional information about supported format strings: Format strings and .NET types.

The following code applies the currency format to the average summaries calculated for the Price field values.

razor
<DxPivotTable Data="SalesData">
    <Fields>
        @*...*@
        <DxPivotTableField Field="@nameof(Sales.SaleInfo.Price)"
                           SortOrder="@PivotTableSortOrder.Ascending"
                           Area="@PivotTableArea.Data"
                           SummaryType="@PivotTableSummaryTypeAverage" 
                           CellFormat="C2"/>
    </Fields>
</DxPivotTable>

Implements

CellFormat

See Also

DxPivotTableField Class

DxPivotTableField Members

DevExpress.Blazor.PivotTable Namespace