Grid Export - OutOfMemoryException

5 posts, 0 answers
  1. NLV
    NLV avatar
    87 posts
    Member since:
    Aug 2009

    Posted 14 Jun 2010 Link to this post

    Hello team

    I've the following code for exporting a grid in various formats.

                if (ddlRBExportFormat.SelectedValue.Equals("MSExcel", StringComparison.InvariantCultureIgnoreCase)) 
                { 
                    rgReportBuilder.MasterTableView.ExportToExcel(); 
                } 
                else if (ddlRBExportFormat.SelectedValue.Equals("MSWord", StringComparison.InvariantCultureIgnoreCase)) 
                { 
                    rgReportBuilder.MasterTableView.ExportToWord(); 
                } 
                else if (ddlRBExportFormat.SelectedValue.Equals("PDF", StringComparison.InvariantCultureIgnoreCase)) 
                { 
                    rgReportBuilder.MasterTableView.ExportToPdf(); 
                } 
                else if (ddlRBExportFormat.SelectedValue.Equals("CSV", StringComparison.InvariantCultureIgnoreCase)) 
                { 
                    rgReportBuilder.MasterTableView.ExportToCSV(); 
                } 

    I've huge number of records in the grid. When i do an export i get OutOfMemoryException. Is there a workaround to eliminate this error?

    Thank you

    Regards
    NLV

  2. Daniel
    Admin
    Daniel avatar
    4945 posts

    Posted 14 Jun 2010 Link to this post

    Hello NLV,

    Please examine the following forum post:
    Export to Excel limit

    Regards,
    Daniel
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Sony
    Sony avatar
    2 posts
    Member since:
    Apr 2012

    Posted 01 Jun 2012 Link to this post

    Hello,

      When I tried to export 100000 records from telerikradgrid to excel, it is showing system.outofmemoryexception as below.

      Is there any solution for this?

    Expecting a response as early as possible.


    Thanks,

    Sony

    Exception of type 'System.OutOfMemoryException' was thrown.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

    Exception Details: System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.

    Source Error: 

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace: 

    [OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.]
       System.Web.UI.WebControls.WebControl.SaveViewState() +82
       System.Web.UI.Control.SaveViewStateRecursive(ViewStateMode inheritedMode) +50
       System.Web.UI.Control.SaveViewStateRecursive(ViewStateMode inheritedMode) +148
       System.Web.UI.Control.SaveViewStateRecursive(ViewStateMode inheritedMode) +148
       System.Web.UI.Control.SaveViewStateRecursive(ViewStateMode inheritedMode) +148
       System.Web.UI.Control.SaveViewStateRecursive(ViewStateMode inheritedMode) +148
       System.Web.UI.Control.SaveViewStateRecursive(ViewStateMode inheritedMode) +148
       System.Web.UI.Control.SaveViewStateRecursive(ViewStateMode inheritedMode) +148
       System.Web.UI.Control.SaveViewStateRecursive(ViewStateMode inheritedMode) +148
       System.Web.UI.Control.SaveViewStateRecursive(ViewStateMode inheritedMode) +148
       System.Web.UI.Page.SaveAllState() +194
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2839
  5. Sony
    Sony avatar
    2 posts
    Member since:
    Apr 2012

    Posted 01 Jun 2012 Link to this post

    Hello,

      When I tried to export 100000 records from telerikradgrid to excel, it is showing system.outofmemoryexception as below.

      Is there any solution for this?

    Expecting a response as early as possible.


    Thanks,

    Sony

    Exception of type 'System.OutOfMemoryException' was thrown.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

    Exception Details: System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.

    Source Error: 

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace: 

    [OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.]
       System.Web.UI.WebControls.WebControl.SaveViewState() +82
       System.Web.UI.Control.SaveViewStateRecursive(ViewStateMode inheritedMode) +50
       System.Web.UI.Control.SaveViewStateRecursive(ViewStateMode inheritedMode) +148
       System.Web.UI.Control.SaveViewStateRecursive(ViewStateMode inheritedMode) +148
       System.Web.UI.Control.SaveViewStateRecursive(ViewStateMode inheritedMode) +148
       System.Web.UI.Control.SaveViewStateRecursive(ViewStateMode inheritedMode) +148
       System.Web.UI.Control.SaveViewStateRecursive(ViewStateMode inheritedMode) +148
       System.Web.UI.Control.SaveViewStateRecursive(ViewStateMode inheritedMode) +148
       System.Web.UI.Control.SaveViewStateRecursive(ViewStateMode inheritedMode) +148
       System.Web.UI.Control.SaveViewStateRecursive(ViewStateMode inheritedMode) +148
       System.Web.UI.Page.SaveAllState() +194
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2839
  6. Jayesh Goyani
    Jayesh Goyani avatar
    2732 posts
    Member since:
    May 2010

    Posted 01 Jun 2012 Link to this post

    Hello Sony,

    Please check below link.
    http://www.telerik.com/community/forums/aspnet-ajax/grid/export-to-excel-limit.aspx


    Thanks,
    Jayesh Goyani
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017