update of sfpivotview to show data modfied in separate widget

Using the right retention widget, i modified the the first item in the pivottable’ datasource and called the UpdateData function below, like in one of your signalR the examples from the forum ( https://www.syncfusion.com/forums/172612/how-to-update-pivot-table-with-source-data-refreshed)   

private void UpdateData() {
        InvokeAsync(() =>
        {
            StateHasChanged();
        });
    }

The call to the UpdateData does not update the pivottable . However when going into editmode, as shown in the image, you can see that the pivottabel has access to the modified data. 

Then I double clicking the row to enter edit mode, this allows me to press the Update table button (even if I made not change) . This will then update the pivot table.

Syncfusion dialog can clearly update the pivottabel in a reliable manner where the source data change. Could you please make this functionality accessible to us so that it becomes way more simple to “force” an update of the view to take into account the modified data. I have wasted two days reading your documentation, examples videos, using the helpbot to force this update. it simple for the grid but not for the sfpivottview 


It does work with ObservableCollection but that is way too slow even for a small number like 5000 rows x 30 columns .

pivotView with external property panel.png


6 Replies

KL Kaspar Lund July 5, 2025 07:30 PM UTC

i am on mac 15.5 chrome: 137.0.7151.122 , syncfusion 

PivotTable" Version="29.1.33



YG Yashvanth Ganesan Syncfusion Team July 7, 2025 10:42 AM UTC

Hi Kaspar,


Thank you for providing the details.


We have reviewed your query and understand that you are experiencing an issue where the data source does not update correctly when dynamically modified via an external button. Upon examining your code, we noticed that you are using StateHasChanged(). While this method triggers a UI refresh, it does not automatically update the underlying data source.


When the button is clicked, you are updating the data source through instances, which may prevent property change notifications from being triggered, leading to the issue. To resolve this, we recommend explicitly reassigning the modified data source to the pivot data when the external button is clicked. Please refer to the code example below for guidance.


Code example:

@page "/"

@using Syncfusion.Blazor.PivotView

@using Syncfusion.Blazor.Buttons

 

<SfButton OnClick="UpdateData" Content="Update Data"></SfButton>

<SfPivotView TValue="ProductDetails" Width="1200" Height="400">

     <PivotViewDataSourceSettings DataSource="@data">

        <PivotViewColumns>

            <PivotViewColumn Name="Year"></PivotViewColumn>

            <PivotViewColumn Name="Quarter"></PivotViewColumn>

        </PivotViewColumns>

        <PivotViewRows>

            <PivotViewRow Name="Country"></PivotViewRow>

            <PivotViewRow Name="Products"></PivotViewRow>

        </PivotViewRows>

        <PivotViewValues>

            <PivotViewValue Name="Sold" Caption="Unit Sold"></PivotViewValue>

            <PivotViewValue Name="Amount" Caption="Sold Amount"></PivotViewValue>

        </PivotViewValues>

        <PivotViewFormatSettings>

            <PivotViewFormatSetting Name="Amount" Format="C"></PivotViewFormatSetting>

        </PivotViewFormatSettings>

    </PivotViewDataSourceSettings>

</SfPivotView>

 

@code{

    public List<ProductDetails> data { get; set; }

    protected override void OnInitialized()

    {

        this.data = ProductDetails.GetProductData().ToList();

    }

 

    public void UpdateData(Microsoft.AspNetCore.Components.Web.MouseEventArgs args){

        List<ProductDetails> NewDataSource = ProductDetails.GetProductData().ToList();

        NewDataSource[0].Country = "Italy";

        this.data = NewDataSource.ToList();

    }

}


Output GIF:



Please let us know if you have any concerns.


Regards,

Yashvanth G G



KL Kaspar Lund July 7, 2025 08:18 PM UTC

changing the datasource requires you to double the amount of data you hold on the client side - not a good approach when all changes are to the attibutes columns and only some of them.

I ask you to provide the function calls that you use internally when updating teh view after edit of the column attributes ?



YG Yashvanth Ganesan Syncfusion Team July 8, 2025 01:49 PM UTC

Hi Kaspar,


We’ve carefully reviewed your query. Referring to our previous response, we understand that you're referring to the phrase “double the amount of data you hold on the client side”—specifically the NewDataSource variable.


To clarify, this variable was declared as an alternative rather than using direct assignment, in order to avoid potential confusion. It is defined and used within the scope of a private function, and therefore, it is automatically disposed of once the function execution completes.


Additionally, we regret to inform you that there is currently no built-in function available to force an update of the data source or refresh report configurations in the Syncfusion Blazor Pivot Table component.


However, we recognize this as a valid requirement and have created feedback titled "Add Built-in Method to Dynamically Update Syncfusion Blazor Pivot Table Data Source". This support is planned for inclusion in one of our upcoming 2025 releases. You can track the status and communicate further through the following link to our feedback portal:



Feedback: Add Built-in Method to Dynamically Update Syncfusion Blazor Pivot Table Data Source in Blazor | Feedback Portal


Disclaimer: Inclusion of this improvement in the release may change due to other factors including but not limited to QA checks and works reprioritization.


We appreciate your patience and understanding in the meantime.


Regards,

Yashvanth G G



KL Kaspar Lund July 8, 2025 06:59 PM UTC

thank you



ME Mohanraj Elumalai Syncfusion Team September 8, 2025 04:45 AM UTC

Hi Kaspar,

Thanks for the patience. We are glad to announce that our Essential Studio 2025 Volume 3 Main Release V31.1.17 is rolled out and the improvement Add Built-in Method to Dynamically Update Syncfusion Blazor Pivot Table Data Source” has been included in this release. Additionally, we have prepared a sample with the latest version for your reference. Please find it from the below attachment.


Please find the release notes below for your reference.

Release Notes: https://blazor.syncfusion.com/documentation/release-notes/31.1.17?type=all#pivot-table


Output Gif:


We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.


Regards,
Mohanraj Elumalai.


Attachment: Blazorserver9_fc638bc4.zip

Loader.
Up arrow icon