We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to export large amount of data in PivotGrid with JSON export?

Platform: ASP.NET MVC |
Control: PivotGrid
Tags: asp, js, mvc, pivotgrid

This KB illustrates that to export large amount of data in PivotGrid with JSON export.


By default, you can export data from pivot component up to 12,000 JSON records. Meanwhile, you can increase the limit by setting the following required properties in Web.config file with maximum limit.


        <jsonSerialization maxJsonLength="2147483647"/> 
    <add key="aspnet:MaxJsonDeserializerMembers" value="2147483647" /> 
<httpRuntime maxRequestLength="1073741824" targetFramework="4.5" /> 
      <requestLimits maxAllowedContentLength="1073741824" /> 


This code increases the exporting support up to 200,000 records. But, when exporting with styles, the maximum exporting support will be up to 150,000 records. Disabling the exportWithStyle api in the “beforeExport” event provides an option to export up to 200,000 records for all types of exporting (Word, PDF, Excel). Find the following code snippet to disable the exportWithStyle api.

JS (beforeExport event for all platforms)

<script type="text/javascript">
function exporting (args) {
    args.exportWithStyle = false;   // by default it sets as true. It improves performance on exporting huge data when it sets as false.



<ej:PivotGrid ID="PivotGrid1" runat="server">
   <ClientSideEvents  BeforeExport="exporting"/>



@Html.EJ().Pivot().PivotGrid("PivotGrid1").ClientSideEvents(clientSideEvents => clientSideEvents.BeforeExport("exporting"))



 beforeExport: "exporting"


2X faster development

The ultimate ASP.NET MVC UI toolkit to boost your development speed.
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile