Skip to main content
All docs
V25.1
  • DxPivotTableField.ValueFormat Property

    Specifies the display format for field values displayed in rows or columns.

    Namespace: DevExpress.Blazor.PivotTable

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

    NuGet Package: DevExpress.Blazor.PivotTable

    Declaration

    [Parameter]
    public string ValueFormat { get; set; }

    Property Value

    Type Description
    String

    The display format.

    Remarks

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

    The following code applies the month format to the Date field values displayed in the Columns area.

    @rendermode InteractiveServer
    
    <DxPivotTable Data="SalesData">
        <Fields>
            <DxPivotTableField Field="@nameof(Sales.SaleInfo.Region)"
                               Area="@PivotTableArea.Row"
                               AreaIndex="0" />
            <DxPivotTableField Field="@nameof(Sales.SaleInfo.Country)"
                               Area="@PivotTableArea.Row"
                               SortOrder="@PivotTableSortOrder.Descending"
                               AreaIndex="1" />
            <DxPivotTableField Field="@nameof(Sales.SaleInfo.Date)"
                               Area="@PivotTableArea.Column"
                               AreaIndex="0"
                               ValueFormat="M"/>
            <DxPivotTableField Field="@nameof(Sales.SaleInfo.Amount)"
                               SortOrder="@PivotTableSortOrder.Ascending"
                               Area="@PivotTableArea.Data"
                               SummaryType="@PivotTableSummaryType.Sum" />
        </Fields>
    </DxPivotTable>
    
    @code {
        IEnumerable<Sales.SaleInfo> SalesData;
        protected override async Task OnInitializedAsync() {
            SalesData = await Sales.GetSalesAsync();
        }
    }
    

    Pivot Table - Value Format

    Implements

    See Also