DxPivotTableField.ValueFormat Property
In This Article
Specifies the display format for field values displayed in rows or columns.
Namespace: DevExpress.Blazor.PivotTable
Assembly: DevExpress.Blazor.PivotTable.v24.2.dll
NuGet Package: DevExpress.Blazor.PivotTable
#Declaration
C#
[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 Data
field values displayed in the Columns area.
@rendermode InteractiveServer
<DxPivotTable Data="SalesData">
<Fields>
<DxPivotTableField Field="@nameof(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<SaleInfo> SalesData;
protected override async Task OnInitializedAsync() {
SalesData = await Sales.GetSalesAsync();
}
}
#Implements
See Also