alexa
menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Search Results for

    Show / Hide Table of Contents

    Class PivotViewTemplates

    Defines templates for customizing pivot component rendering.

    Inheritance
    object
    ComponentBase
    OwningComponentBase
    SfOwningComponentBase
    PivotViewTemplates
    Implements
    IComponent
    IHandleEvent
    IHandleAfterRender
    IDisposable
    Inherited Members
    ComponentBase.Assets
    ComponentBase.AssignedRenderMode
    ComponentBase.BuildRenderTree(RenderTreeBuilder)
    ComponentBase.DispatchExceptionAsync(Exception)
    ComponentBase.InvokeAsync(Action)
    ComponentBase.InvokeAsync(Func<Task>)
    ComponentBase.OnAfterRender(bool)
    ComponentBase.OnAfterRenderAsync(bool)
    ComponentBase.OnInitialized()
    ComponentBase.OnParametersSet()
    ComponentBase.OnParametersSetAsync()
    ComponentBase.RendererInfo
    ComponentBase.SetParametersAsync(ParameterView)
    ComponentBase.ShouldRender()
    ComponentBase.StateHasChanged()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    OwningComponentBase.IsDisposed
    OwningComponentBase.ScopedServices
    Namespace: Syncfusion.Blazor.PivotView
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class PivotViewTemplates : SfOwningComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable

    Constructors

    PivotViewTemplates()

    Declaration
    public PivotViewTemplates()

    Properties

    CellTemplate

    Gets or sets the template for rendering pivot cell content alongside the cell value.

    Declaration
    [Parameter]
    [JsonIgnore]
    public RenderFragment<AxisSet> CellTemplate { get; set; }
    Property Value
    Type Description
    RenderFragment<AxisSet>

    A RenderFragment<TValue> for customizing pivot cell rendering.

    Remarks

    The context parameter provides cell details: Axis, Type, FormattedText, and Value.

    Examples

    The following example shows how to render a custom cell template in a PivotView:

    <SfPivotView TValue="ProductDetails" Width="800" Height="500">
        <PivotViewDataSourceSettings DataSource="@data">
            <!-- Configure rows, columns, values, and filters -->
        </PivotViewDataSourceSettings>
        <PivotViewTemplates>
            <CellTemplate>
                @((context) =>
                {
                    <text>
                        <div style="color:blue">
                            @context.Value
                        </div>
                    </text>;
                })
            </CellTemplate>
        </PivotViewTemplates>
    </SfPivotView>

    SpinnerTemplate

    Gets or sets the template for customizing the pivot loading spinner.

    Declaration
    [Parameter]
    [JsonIgnore]
    public RenderFragment<object> SpinnerTemplate { get; set; }
    Property Value
    Type Description
    RenderFragment<object>

    A RenderFragment<TValue> for defining custom spinner content.

    Remarks

    The context parameter provides the Text property for loading text.

    Examples

    The following example shows how to render a custom spinner template in a PivotView:

    <SfPivotView TValue="ProductDetails" Width="800" Height="500">
        <PivotViewDataSourceSettings DataSource="@data">
            <!-- Configure rows, columns, values, and filters -->
        </PivotViewDataSourceSettings>
        <PivotViewTemplates>
            <SpinnerTemplate>
                @((context) =>
                {
                    <text>
                        <div class="custom-spinner">
                            <div class="double-bounce1"></div>
                            <div class="double-bounce2"></div>
                        </div>
                    </text>;
                })
            </SpinnerTemplate>
        </PivotViewTemplates>
    </SfPivotView>

    ToolbarTemplate

    Gets or sets the template for rendering a custom pivot toolbar.

    Declaration
    [Parameter]
    [JsonIgnore]
    public RenderFragment<object> ToolbarTemplate { get; set; }
    Property Value
    Type Description
    RenderFragment<object>

    A RenderFragment<TValue> for defining custom toolbar UI.

    Remarks

    The context parameter provides the Items collection of toolbar buttons.

    Examples

    The following example shows how to render a custom toolbar template in a PivotView:

    <SfPivotView TValue="ProductDetails" Width="800" Height="500">
        <PivotViewDataSourceSettings DataSource="@data">
            <!-- Configure rows, columns, values, and filters -->
        </PivotViewDataSourceSettings>
        <PivotViewTemplates>
            <ToolbarTemplate>
                @((context) =>
                {
                    <text>
                        <div class="custom-toolbar">
                            <div class="custom-toolbar-content">
                                <button class="custom-toolbar-button">Custom Button</button>
                            </div>
                        </div>
                    </text>;
                })
            </ToolbarTemplate>
        </PivotViewTemplates>
    </SfPivotView>

    TooltipTemplate

    Gets or sets the template for rendering pivot table tooltips with custom content.

    Declaration
    [Parameter]
    [JsonIgnore]
    public RenderFragment<PivotTooltipTemplateContext> TooltipTemplate { get; set; }
    Property Value
    Type Description
    RenderFragment<PivotTooltipTemplateContext>

    A RenderFragment<TValue> for customizing tooltip display.

    Remarks

    The context parameter provides tooltip details: Axis, CellType, FormattedText, and Value.

    Examples

    The following example shows how to render a custom tooltip template in a PivotView:

    <SfPivotView TValue="ProductDetails" Width="800" Height="500">
        <PivotViewDataSourceSettings DataSource="@data">
            <!-- Configure rows, columns, values, and filters -->
        </PivotViewDataSourceSettings>
        <PivotViewTemplates>
            <TooltipTemplate>
                @((context) =>
                {
                    <text>
                        <div style="padding:10px; background-color:#f9f9f9; border:1px solid #ccc;">
                            <h4 style="margin:0; color:#333;">Tooltip Info</h4>
                            <p style="margin:5px 0 0 0; color:#666;">Value: @context.Value</p>
                        </div>
                    </text>;
                })
            </TooltipTemplate>
        </PivotViewTemplates>
    </SfPivotView>

    Methods

    Dispose(bool)

    Dispose unmanaged resources in the Blazor component.

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    bool disposing

    Boolean value to dispose the object.

    Overrides
    OwningComponentBase.Dispose(bool)

    OnInitializedAsync()

    Method invoked when the component is ready to start, having received its initial parameters from its parent in the render tree. Override this method if you will perform an asynchronous operation and want the component to refresh when that operation is completed.

    Declaration
    protected override Task OnInitializedAsync()
    Returns
    Type Description
    Task

    A System.Threading.Tasks.Task representing any asynchronous operation.

    Overrides
    ComponentBase.OnInitializedAsync()

    Implements

    IComponent
    IHandleEvent
    IHandleAfterRender
    IDisposable
    In this article
    Back to top Generated by DocFX
    Copyright © 2001 - 2026 Syncfusion Inc. All Rights Reserved