Handling Server-Side Timeout from .NET Pivot Engine in Angular Pivot Table

Dear Syncfusion Support Team,

I am currently utilizing the Syncfusion Angular Pivot Table (ej2-angular-pivotview) in conjunction with a custom server-side ASP.NET Core Pivot Engine, following the documentation provided at https://ej2.syncfusion.com/angular/documentation/pivotview/server-side-pivot-engine.

My server-side .NET application has a configured data access timeout of 90 seconds. While this timeout is correctly enforced on the backend for heavy queries, I am encountering an issue where the Angular frontend does not appear to capture or react to this server-side timeout response.

Specifically, when a Pivot Table query takes longer than 90 seconds to process on the server, the .NET application correctly times out. However, on the client-side (Angular), the Pivot Table remains in a loading state indefinitely or does not provide any explicit indication to the user that a timeout has occurred. This leads to a poor user experience as the user is unaware of the underlying issue.

Could you please provide guidance or examples on how to effectively capture and manage server-side timeouts that originate from the custom .NET Pivot Engine within the Syncfusion Angular Pivot Table? Are there specific events, properties, or methods within the ej2-angular-pivotview component that can be leveraged for this purpose?

Any assistance or code examples would be greatly appreciated.


Thank you for your time and support.


2 Replies

YG Yashvanth Ganesan Syncfusion Team July 21, 2025 04:32 PM UTC

Hi Desarrollador,


Thank you for contacting Syncfusion Support!


We’ve reviewed your query and understood that you're currently working with the Angular Pivot Table using a server-side engine, along with server-side timeout handling. To manage server responses effectively, you can use the afterServiceInvoke event, which is triggered once the service execution is complete. Based on the response type, you can handle timeout exceptions appropriately.


For demonstration purposes, we’ve simulated a timeout response from the server and displayed an error popup based on the response type.


In the Controller:

  • We implemented a timeout scenario using a try-catch block within the getPivotValues method to align with your use case.
  • If the pivot engine takes longer than expected, it throws a timeout error, which can then be detected on the client side using the afterServiceInvoke event.


In the Client-Side Sample:

  • The afterServiceInvoke event is used to inspect the server response.
  • If a timeout error message is returned, it is captured and displayed in a custom dialog box.
  • You can leverage this event to show custom messages or alerts when the expected data is not received.


Sample link - Dsdnjrgj (duplicated) - StackBlitz

Code snippet:

afterServiceInvoke(argsany): void {

        let response = JSON.parse(args.response);

        if(response.status === 408) {

            let dialogObjDialog = new Dialog({

                header: response.error,

                content: response.message,

                target: document.getElementById('target'),

                showCloseIcon: true,

                width: '450px',

                height: '100px'

            });

            dialogObj.appendTo('#defaultDialog');

        }

    };


Output screenshot:


Please try out the above solution and let us know if you need any further assistance. We're here to help!


Regards,

Yashvanth G G



YG Yashvanth Ganesan Syncfusion Team July 21, 2025 04:37 PM UTC

Hi Desarrollador,

Please find the controller below,


Attachment: serversidepivotengineforpivottable_479494ed.zip

Loader.
Up arrow icon