menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class PivotViewEvents<TValue> - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    Class PivotViewEvents<TValue>

    Configures pivot view events.

    Inheritance
    System.Object
    PivotViewEvents<TValue>
    Namespace: Syncfusion.Blazor.PivotView
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class PivotViewEvents<TValue> : OwningComponentBase
    Type Parameters
    Name Description
    TValue

    A type which provides schema for the pivot component.

    Constructors

    PivotViewEvents()

    Declaration
    public PivotViewEvents()

    Properties

    AggregateCellInfo

    It allows to change the each cell value during engine populating.

    Declaration
    public EventCallback<AggregateEventArgs> AggregateCellInfo { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<AggregateEventArgs>

    An event callback function.

    AggregateMenuOpen

    It triggers before aggregate type context menu opens.

    Declaration
    public EventCallback<AggregateMenuOpenEventArgs> AggregateMenuOpen { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<AggregateMenuOpenEventArgs>

    An event callback function.

    BeforeColumnsRender

    Occurs before each column is rendered in the pivot table. This event allows modification of column properties such as width, alignment, autofit, reordering, or visibility before they are displayed.

    Declaration
    public Action<ColumnRenderEventArgs> BeforeColumnsRender { get; set; }
    Property Value
    Type
    System.Action<ColumnRenderEventArgs>
    Remarks

    Use this event to dynamically modify column properties like width, alignment, autofit, reordering, or visibility before rendering.

    Examples

    The following example demonstrates how to use the BeforeColumnsRender event to dynamically modify column properties:

    @using Syncfusion.Blazor.PivotView
    
    <SfPivotView TValue="ExpandoObject">
        <PivotViewEvents TValue="ExpandoObject" BeforeColumnsRender="OnBeforeColumnsRender" />
    </SfPivotView>
    
    @code {
        public void OnBeforeColumnsRender(ColumnRenderEventArgs args)
        {
            // Example: Modify column properties
            args.Width = 150; // Set column width
            args.AutoFit = true; // Enable autofit
        }
    }

    BeforeExport

    It triggers before exporting pivot table.

    Declaration
    public EventCallback<BeforeExportEventArgs> BeforeExport { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<BeforeExportEventArgs>

    An event callback function.

    BeginDrillThrough

    It triggers when a value cell is clicked in the pivot table for Editing.

    Declaration
    public EventCallback<BeginDrillThroughEventArgs> BeginDrillThrough { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<BeginDrillThroughEventArgs>

    An event callback function.

    CalculatedFieldCreate

    It triggers before a calculated field created/edited during runtime.

    Declaration
    public EventCallback<CalculatedFieldCreateEventArgs> CalculatedFieldCreate { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<CalculatedFieldCreateEventArgs>

    An event callback function.

    CellClick

    It triggers when a cell is clicked in the pivot table.

    Declaration
    public EventCallback<CellClickEventArgs> CellClick { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<CellClickEventArgs>

    An event callback function.

    CellDeselected

    It triggers when a cell got deselected in the pivot table.

    Declaration
    public EventCallback<CellDeselectEventArgs<TValue>> CellDeselected { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<CellDeselectEventArgs<TValue>>

    An event callback function.

    CellDeselecting

    Triggers before any cell deselection occurs.

    Declaration
    public EventCallback<CellDeselectEventArgs<TValue>> CellDeselecting { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<CellDeselectEventArgs<TValue>>

    An event callback function.

    CellSelected

    It triggers when a cell got selected in the pivot table.

    Declaration
    public EventCallback<PivotCellSelectedEventArgs> CellSelected { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<PivotCellSelectedEventArgs>

    An event callback function.

    CellSelecting

    It triggers before a cell selected in pivot table.

    Declaration
    public EventCallback<PivotCellSelectedEventArgs> CellSelecting { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<PivotCellSelectedEventArgs>

    An event callback function.

    ChartPointClick

    Triggers on chart series is point click.

    Declaration
    public EventCallback<PointEventArgs> ChartPointClick { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<PointEventArgs>

    An event callback function.

    ChartSeriesCreated

    It triggers when the pivot chart series are created.

    Declaration
    public EventCallback<ChartSeriesCreatedEventArgs> ChartSeriesCreated { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<ChartSeriesCreatedEventArgs>

    An event callback function.

    ChartTooltipRender

    Triggers before chart series is begging rendered.

    Declaration
    public EventCallback<TooltipRenderEventArgs> ChartTooltipRender { get; set; }
    Property Value
    Type
    Microsoft.AspNetCore.Components.EventCallback<TooltipRenderEventArgs>

    ConditionalFormatting

    It allows to do changes before applying the conditional formatting.

    Declaration
    public EventCallback<ConditionalFormatSettings> ConditionalFormatting { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<ConditionalFormatSettings>

    An event callback function.

    Created

    It triggers when the pivot table component is created.

    Declaration
    public EventCallback<object> Created { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<System.Object>

    An event callback function.

    DataBound

    It triggers when the pivot table rendered.

    Declaration
    public EventCallback<object> DataBound { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<System.Object>

    An event callback function.

    Destroyed

    It triggers when pivot table component getting destroyed.

    Declaration
    public EventCallback<object> Destroyed { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<System.Object>

    An event callback function.

    Drill

    It triggers before the header to be either expanded or collapsed in the pivot table.

    Declaration
    public EventCallback<DrillArgs<TValue>> Drill { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<DrillArgs<TValue>>

    An event callback function.

    DrillThrough

    It triggers when a value cell is clicked in the pivot table for Drill-Through.

    Declaration
    public EventCallback<DrillThroughEventArgs> DrillThrough { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<DrillThroughEventArgs>

    An event callback function.

    EditCompleted

    It triggers when editing is made in the raw data of pivot table.

    Declaration
    public EventCallback<EditCompletedEventArgs<TValue>> EditCompleted { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<EditCompletedEventArgs<TValue>>

    An event callback function.

    EnginePopulated

    It triggers after the pivot engine populated and allows to customize the pivot datasource settings.

    Declaration
    public EventCallback<EnginePopulatedEventArgs> EnginePopulated { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<EnginePopulatedEventArgs>

    An event callback function.

    EnginePopulating

    It triggers before the pivot engine starts to populate and allows to customize the pivot datasource settings.

    Declaration
    public EventCallback<EnginePopulatingEventArgs> EnginePopulating { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<EnginePopulatingEventArgs>

    An event callback function.

    ExcelHeaderQueryCellInfo

    The ExcelHeaderQueryCellInfoEvent event is triggered every time a data is entered into a header cell of the Excel sheet.

    Declaration
    public Action<ExcelHeaderQueryCellInfoEventArgs> ExcelHeaderQueryCellInfo { get; set; }
    Property Value
    Type Description
    System.Action<ExcelHeaderQueryCellInfoEventArgs>

    An event callback function.

    ExcelQueryCellInfo

    Gets or sets the event callback that is triggered whenever a pivot table data cell is exported to an Excel document. This event occurs when the user clicks the Excel export icon in the toolbar or triggers an export through an external button.

    Declaration
    public Action<ExcelQueryCellInfoEventArgs<TValue>> ExcelQueryCellInfo { get; set; }
    Property Value
    Type
    System.Action<ExcelQueryCellInfoEventArgs<TValue>>
    Remarks

    This event handler receives an ExcelQueryCellInfoEventArgs<T> object, which provides details about the corresponding row and cell being exported. You can use this event to customize the appearance and contents of individual data cells in the exported Excel document.

    Examples

    This example demonstrates how to use the ExcelQueryCellInfo event to customize the exported Excel document.

    @using Syncfusion.Blazor.PivotView
    
    <SfPivotView TValue="ExpandoObject" AllowExcelExport="true" ShowToolbar="true" 
                 Toolbar="@(new List<ToolbarItems>() { ToolbarItems.Export })">
        <PivotViewEvents TValue="ExpandoObject" ExcelQueryCellInfo="ExcelQueryEvent">
        </PivotViewEvents>
    </SfPivotView>
    
    @code {
        SfPivotView<ExpandoObject> pivot;
    
        public void ExcelQueryEvent(ExcelQueryCellInfoEventArgs<ExpandoObject> args)
        {
            // Customize the content or style of the exported Excel cells here.
            args.Style.BackColor = "#FFFF00"; // Highlight the cell with yellow color.
        }
    }

    ExportCompleted

    The event triggers when exporting to PDF, Excel, or CSV is complete.

    Declaration
    public Action<object> ExportCompleted { get; set; }
    Property Value
    Type
    System.Action<System.Object>

    FetchReport

    It allows you to fetch the report names from specified storage.

    Declaration
    public EventCallback<FetchReportArgs> FetchReport { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<FetchReportArgs>

    An event callback function.

    FieldDragStart

    It triggers when a field drag (move) starts.

    Declaration
    public EventCallback<FieldDragStartEventArgs> FieldDragStart { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<FieldDragStartEventArgs>

    An event callback function.

    FieldDrop

    It triggers before a field drops into any axis.

    Declaration
    public EventCallback<FieldDropEventArgs> FieldDrop { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<FieldDropEventArgs>

    An event callback function.

    FieldDropped

    It triggers after a field dropped into the axis.

    Declaration
    public EventCallback<FieldDroppedEventArgs> FieldDropped { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<FieldDroppedEventArgs>

    An event callback function.

    FieldListRefreshed

    It allows to identify whether the field list updated or not.

    Declaration
    public EventCallback<FieldListRefreshedEventArgs> FieldListRefreshed { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<FieldListRefreshedEventArgs>

    An event callback function.

    FieldRemove

    It triggers before removing the field from any axis during runtime.

    Declaration
    public EventCallback<FieldRemoveEventArgs> FieldRemove { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<FieldRemoveEventArgs>

    An event callback function.

    HyperlinkCellClicked

    It triggers when a hyperlink cell is clicked in the pivot table.

    Declaration
    public EventCallback<HyperCellClickEventArgs> HyperlinkCellClicked { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<HyperCellClickEventArgs>

    An event callback function.

    LoadReport

    It allows to load the report from specified storage.

    Declaration
    public EventCallback<LoadReportArgs> LoadReport { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<LoadReportArgs>

    An event callback function.

    MemberEditorOpen

    Occurs before the filter dialog opens when the filter icon is clicked on a specific field in the grouping bar or field list. This event allows modification of the field members displayed in the filter dialog.

    Declaration
    public Action<MemberEditorOpenEventArgs> MemberEditorOpen { get; set; }
    Property Value
    Type
    System.Action<MemberEditorOpenEventArgs>
    Remarks

    Use this event to modify the field members shown in the filter dialog or to cancel the dialog from opening.

    Examples

    The following example demonstrates how to use the MemberEditorOpen event to modify the field members displayed in the filter dialog or cancel its opening:

    @using Syncfusion.Blazor.PivotView
    
    <SfPivotView TValue="ExpandoObject">
        <PivotViewEvents TValue="ExpandoObject" MemberEditorOpen="OnMemberEditorOpen" />
    </SfPivotView>
    
    @code {
        public void OnMemberEditorOpen(MemberEditorOpenEventArgs args)
        {
            // Example: Modify field members or cancel the dialog
            args.Cancel = true; // Cancel opening the dialog
        }
    }

    MemberFiltering

    It triggers before the filtering applied.

    Declaration
    public EventCallback<MemberFilteringEventArgs> MemberFiltering { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<MemberFilteringEventArgs>

    An event callback function.

    NewReport

    It allows to set the new report.

    Declaration
    public EventCallback<NewReportArgs> NewReport { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<NewReportArgs>

    An event callback function.

    NumberFormatting

    It triggers before number format is apllied to specific field during runtime.

    Declaration
    public EventCallback<NumberFormattingEventArgs> NumberFormatting { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<NumberFormattingEventArgs>

    An event callback function.

    OnActionBegin

    It triggers when UI action begins in the pivot table. The UI actions used to trigger this event such as drill down/up, value sorting, built-in toolbar options, grouping bar and field list buttons actions such as sorting, filtering, editing, aggregate type change and so on, CRUD operation in editing.

    Declaration
    public Action<PivotActionBeginEventArgs> OnActionBegin { get; set; }
    Property Value
    Type Description
    System.Action<PivotActionBeginEventArgs>

    An event callback function.

    Remarks

    This event handler receives a PivotActionBeginEventArgs object that provides information about the current UI action of the pivot table.

    Examples
    <SfPivotView>
        <PivotViewEvents TValue="ProductDetails" OnActionBegin="ActionBegin"></PivotViewEvents>
    </SfPivotView>
    
    @code {
        public void ActionBegin (PivotActionBeginEventArgs args)
        {
    
        }
    }

    OnActionComplete

    It triggers when UI action in the pivot table completed. The UI actions used to trigger this event such as drill down/up, value sorting, built-in toolbar options, grouping bar and field list buttons actions such as sorting, filtering, editing, aggregate type change and so on, CRUD operation in editing.

    Declaration
    public Action<PivotActionCompleteEventArgs<TValue>> OnActionComplete { get; set; }
    Property Value
    Type Description
    System.Action<PivotActionCompleteEventArgs<TValue>>

    An event callback function.

    Remarks

    This event handler receives a PivotActionCompleteEventArgs<T> object that provides information about the current UI action of the pivot table.

    Examples
    <SfPivotView>
        <PivotViewEvents TValue="ProductDetails" OnActionComplete="ActionCompleted"></PivotViewEvents>
    </SfPivotView>
    
    @code {
        public void ActionCompleted (PivotActionCompleteEventArgs<ProductDetails> args)
        {
    
        }
    }

    OnActionFailure

    It triggers when UI action failed to achieve the desired results in the pivot table. The UI actions used to trigger this event such as drill down/up, value sorting, built-in toolbar options, grouping bar and field list buttons actions such as sorting, filtering, editing, aggregate type change and so on, CRUD operation in editing.

    Declaration
    public Action<PivotActionFailureEventArgs> OnActionFailure { get; set; }
    Property Value
    Type Description
    System.Action<PivotActionFailureEventArgs>

    An event callback function.

    Remarks

    This event handler receives a PivotActionFailureEventArgs object that provides information about the error in pivot table. Stack trace of exceptions, if any, can also be obtained here.

    Examples
    <SfPivotView>
        <PivotViewEvents TValue="ProductDetails" OnActionFailure="ActionFailed"></PivotViewEvents>
    </SfPivotView>
    
    @code {
        public void ActionFailed (PivotActionFailureEventArgs args)
        {
    
        }
    }

    OnAxisLabelRender

    Triggers before each axis label is rendered.

    Declaration
    public Action<AxisLabelRenderEventArgs> OnAxisLabelRender { get; set; }
    Property Value
    Type Description
    System.Action<AxisLabelRenderEventArgs>

    An event callback function.

    OnLegendClick

    Triggers when the chart legend of a specific series is clicked.

    Declaration
    public EventCallback<LegendClickEventArgs> OnLegendClick { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<LegendClickEventArgs>

    An event callback function.

    Remarks

    This event handler receives a LegendClickEventArgs object that specifies the event arguments available for the legend item click events in the pivot chart.

    Examples
    <SfPivotView>
        <PivotViewEvents TValue="ProductDetails" OnLegendClick="OnLegendClick"></PivotViewEvents>
    </SfPivotView>
    
    @code {
        public void OnLegendClick(LegendClickEventArgs args)
        {
    
        }
    }

    OnLegendItemRender

    Triggers before chart legend is begging rendered.

    Declaration
    public Action<LegendRenderEventArgs> OnLegendItemRender { get; set; }
    Property Value
    Type Description
    System.Action<LegendRenderEventArgs>

    An event callback function.

    OnLoad

    It allows any customization on the pivot table component properties on initial rendering. Based on the changes, pivot table will be redered.

    Declaration
    public EventCallback<LoadEventArgs<TValue>> OnLoad { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<LoadEventArgs<TValue>>

    An event callback function.

    OnPointRender

    Triggers before chart point is begging rendered.

    Declaration
    public EventCallback<PointRenderEventArgs> OnPointRender { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<PointRenderEventArgs>

    An event callback function.

    OnToolbarClick

    It allows to change the toolbar items.

    Declaration
    public EventCallback<ClickEventArgs> OnToolbarClick { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<ClickEventArgs>

    An event callback function.

    Parent

    Pivot component.

    Declaration
    protected SfPivotView<TValue> Parent { get; set; }
    Property Value
    Type
    SfPivotView<TValue>

    PdfCellRender

    It allows any customization of Pivot cell style while PDF exporting.

    Declaration
    public EventCallback<PdfCellRenderArgs> PdfCellRender { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<PdfCellRenderArgs>

    An event callback function.

    PdfHeaderQueryCellInfo

    The PdfHeaderQueryCellInfoEvent event is triggered every time a data is entered into a header cell of the pdf document.

    Declaration
    public Action<PdfHeaderQueryCellInfoEventArgs> PdfHeaderQueryCellInfo { get; set; }
    Property Value
    Type Description
    System.Action<PdfHeaderQueryCellInfoEventArgs>

    An event callback function.

    PdfQueryCellInfo

    Gets or sets the event callback that is triggered whenever a pivot table data cell is exported to a PDF document. This event occurs when the user clicks the PDF export icon in the toolbar or triggers an export through an external button.

    Declaration
    public Action<PdfQueryCellInfoEventArgs<TValue>> PdfQueryCellInfo { get; set; }
    Property Value
    Type
    System.Action<PdfQueryCellInfoEventArgs<TValue>>
    Remarks

    This event handler receives a PdfQueryCellInfoEventArgs<T> object, which provides details about the corresponding row and cell being exported. You can use this event to customize the appearance and contents of individual data cells in the exported PDF document.

    Examples

    This example demonstrates how to use the PdfQueryCellInfo event to customize the exported PDF document.

    @using Syncfusion.Blazor.PivotView
    
    <SfPivotView TValue="ExpandoObject" AllowPdfExport="true" ShowToolbar="true" 
                 Toolbar="@(new List<ToolbarItems>() { ToolbarItems.Export })">
        <PivotViewEvents TValue="ExpandoObject" PdfQueryCellInfo="PdfQueryEvent">
        </PivotViewEvents>
    </SfPivotView>
    
    @code {
        SfPivotView<ExpandoObject> pivot;
    
        public void PdfQueryEvent(PdfQueryCellInfoEventArgs<ExpandoObject> args)
        {
            // Customize the content or style of the exported PDF cells here.
            args.Style.TextBrushColor = "#FF5733"; // Set text color to orange.
        }
    }

    QueryCellInfo

    Triggered every time a request is made to access cell information, element, or data. It will get triggered before the cell element is appended to the Grid element.

    Declaration
    public EventCallback<QueryCellInfoEventArgs<TValue>> QueryCellInfo { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<QueryCellInfoEventArgs<TValue>>

    An event callback function.

    RemoveReport

    It allows you to remove the current report from the specified storage.

    Declaration
    public EventCallback<RemoveReportArgs> RemoveReport { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<RemoveReportArgs>

    An event callback function.

    RenameReport

    It allows you to rename the current report.

    Declaration
    public EventCallback<RenameReportArgs> RenameReport { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<RenameReportArgs>

    An event callback function.

    ResizeStart

    It triggers when column resize starts in the pivot table.

    Declaration
    public EventCallback<ResizeArgs> ResizeStart { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<ResizeArgs>

    An event callback function.

    ResizeStop

    It triggers when column resize ends in the pivot table.

    Declaration
    public EventCallback<ResizeArgs> ResizeStop { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<ResizeArgs>

    An event callback function.

    RowDeselected

    Triggers when a selected row is deselected.

    Declaration
    public EventCallback<RowDeselectEventArgs<TValue>> RowDeselected { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<RowDeselectEventArgs<TValue>>

    An event callback function.

    RowDeselecting

    Triggers before deselecting the selected row.

    Declaration
    public EventCallback<RowDeselectEventArgs<TValue>> RowDeselecting { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<RowDeselectEventArgs<TValue>>

    An event callback function.

    RowSelected

    Triggers after a row is selected.

    Declaration
    public EventCallback<RowSelectEventArgs<TValue>> RowSelected { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<RowSelectEventArgs<TValue>>

    An event callback function.

    RowSelecting

    Triggers before row selection occurs.

    Declaration
    public EventCallback<RowSelectingEventArgs<TValue>> RowSelecting { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<RowSelectingEventArgs<TValue>>

    An event callback function.

    SaveReport

    It allows you to save the report to the specified storage.

    Declaration
    public EventCallback<SaveReportArgs> SaveReport { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<SaveReportArgs>

    An event callback function.

    ServiceInvoked

    Gets or sets the delegate that is invoked after a service request has been processed by the server engine. This event is triggered when the Pivot Table receives a response from the server, allowing customization of the response or additional UI actions before it is applied to Pivot Table UI.

    Declaration
    public Action<ServiceInvokedEventArgs> ServiceInvoked { get; set; }
    Property Value
    Type Description
    System.Action<ServiceInvokedEventArgs>

    A delegate of type System.Action<> that takes an instance of ServiceInvokedEventArgs as its parameter. This can be used to inspect, modify, or cancel the processing of the response data.

    Remarks

    The ServiceInvoked event is useful for handling the server response received by the Pivot Table component. It provides access to the raw response and allows modification or cancellation of the default behavior using the ServiceInvokedEventArgs instance.

    Examples

    The following example demonstrates how to handle the ServiceInvoked event in the PivotViewEvents to conditionally cancel further response processing.

    @using Syncfusion.Blazor.PivotView
    
    <SfPivotView TValue="ExpandoObject" Height="400px">
        <PivotViewEvents TValue="ExpandoObject" ServiceInvoked="OnServiceInvoked" />
    </SfPivotView>
    
    @code {
        public void OnServiceInvoked(ServiceInvokedEventArgs args)
        {
            // Cancel further response processing if a specific condition is met
            if (args?.Data != null && args.Data.ToString().Contains("error"))
            {
                args.Cancel = true;
            }
        }
    }

    ServiceInvoking

    Gets or sets the delegate that is invoked before a service request is sent from the Pivot Table to the server. This event is triggered before initiating a server call, allowing customization of the request parameters.

    Declaration
    public Action<ServiceInvokeEventArgs> ServiceInvoking { get; set; }
    Property Value
    Type Description
    System.Action<ServiceInvokeEventArgs>

    A delegate of type System.Action<> that takes an instance of ServiceInvokeEventArgs as its parameter. This can be used to modify the request data, set headers, or append custom properties before the request is sent.

    Remarks

    The ServiceInvoking event is useful for customizing the outgoing server request made by the Pivot Table component. You can modify the request using the ServiceInvokeEventArgs object, such as enabling sorting, adding filters, or injecting additional context-specific properties.

    Examples

    The following example demonstrates how to handle the ServiceInvoking event in the PivotViewEvents to add custom properties to the service request.

    @using Syncfusion.Blazor.PivotView
    
    <SfPivotView TValue="ExpandoObject" Height="400px">
        <PivotViewEvents TValue="ExpandoObject" ServiceInvoking="OnServiceInvoking" />
    </SfPivotView>
    
    @code {
        public void OnServiceInvoking(ServiceInvokeEventArgs args)
        {
            // Add custom properties and enable sorting before sending the request
            args.DataSourceSettings.EnableSorting = true;
            args.CustomProperties = new { Department = "Finance", Year = "2025" };
        }
    }

    ToolbarRendered

    It allows to change the toolbar items.

    Declaration
    public EventCallback<ToolbarArgs> ToolbarRendered { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<ToolbarArgs>

    An event callback function.

    Methods

    Dispose(Boolean)

    Dispose unmanaged resources.

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

    Boolean value to dispose the object.

    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
    System.Threading.Tasks.Task

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

    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved