Export to Excel in Telerik Parent Child hierarchical grid

2 posts, 0 answers
  1. Prasad
    Prasad avatar
    27 posts
    Member since:
    Oct 2009

    Posted 08 Dec 2012 Link to this post

    Hi,
    We are using having parent child hierarchical Telerik Grid. The grid is containing large number of records(77506 items in 7751 pages).After 2-3 mins,after clicking the Export to Excel button, It's throwing Exception as "Exception of type 'System.OutOfMemoryException' was thrown."



    Using the below code for Export to Excel button click event.

    gviewAuditTrial.MasterTableView.HierarchyLoadMode = GridChildLoadMode.ServerBind;
                gviewAuditTrial.ExportSettings.Excel.Format = GridExcelExportFormat.ExcelML;
                gviewAuditTrial.ExportSettings.IgnorePaging = true;
                gviewAuditTrial.ExportSettings.OpenInNewWindow = true;
                gviewAuditTrial.ExportSettings.FileName = "CRF_Details";
                gviewAuditTrial.ExportSettings.ExportOnlyData = true;
                gviewAuditTrial.MasterTableView.ExportToExcel();

    Please let me know the solution for this.

    Thanks,
    Prasad
    Prasad@magnasys.net


  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 10 Dec 2012 Link to this post

    Hi,

    I suppose this issue arises when you export large amount of data. Check the following forum thread which discussed similar scenario.
    Grid Export - OutOfMemoryException

    Thanks,
    Shinu.
Back to Top