This is a migrated thread and some comments may be shown as answers.

Export to Excel in Telerik Parent Child hierarchical grid

1 Answer 83 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Prasad
Top achievements
Rank 1
Prasad asked on 08 Dec 2012, 01:44 PM
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


1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 10 Dec 2012, 06:23 AM
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.
Tags
General Discussions
Asked by
Prasad
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or