Back to Devexpress

DxPivotGridField.HeaderTemplate Property

blazor-devexpress-dot-blazor-dot-dxpivotgridfield-35065846.md

latest1.7 KB
Original Source

DxPivotGridField.HeaderTemplate Property

Specifies a template used to display row and column headers.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
[Parameter]
public RenderFragment<object> HeaderTemplate { get; set; }

Property Value

TypeDescription
RenderFragment<Object>

The template content.

|

Remarks

Important

The Pivot Grid was moved to maintenance support mode. No new features/capabilities will be added to this component. We recommend that you migrate to the Pivot Table component.

The HeaderTemplate property specifies the content for the row or column header. Use the template’s context parameter to get the field value.

The following code snippet sets a group interval:

razor
<DxPivotGrid Data="@GridData">
    <DxPivotGridField Field="@nameof(SaleInfo.Date)" GroupInterval="PivotGridGroupInterval.Quarter" Area="PivotGridFieldArea.Column" Caption="Quarter">
        <HeaderTemplate>@string.Format("Q{0}", context)</HeaderTemplate>
    </DxPivotGridField>
</DxPivotGrid>

See Also

DxPivotGridField Class

DxPivotGridField Members

DevExpress.Blazor Namespace