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

Export To PDF locks UI Thread

1 Answer 133 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Phil
Top achievements
Rank 1
Phil asked on 24 Jul 2012, 06:36 PM
I am exporting a GridView of about 1500 rows and 20 columns to Excel and PDF.  I do both in a BackgroundWorker Thread.  The Excel export works fantastic and does not lock my UI.  However, the PDF export takes significantly longer and locks my UI thread even though I am running it from a different thread.  

What gives?

This is in my DoWork() method.  It 'hangs' on the "RunExport()" line.

ExportToPDF pdfExporter = new ExportToPDF(uxResultsView);
    pdfExporter.FileExtension = "pdf";
    pdfExporter.PageTitle = "Provider Search Results";
    pdfExporter.FitToPageWidth = true;
    pdfExporter.ExportVisualSettings = true;
 
    pdfExporter.RunExport(fileName);

1 Answer, 1 is accepted

Sort by
0
Svett
Telerik team
answered on 27 Jul 2012, 10:54 AM
Hi John,

Presently, the PDF export uses visual elements created by the RadGridView. The visual elements are owned by the UI thread. In this case, the PDF export performs some of the operations in the UI thread event thought it is running in background worker.

I will consider your scenario as feature request. I logged it in our public issue tracking system.

I updated your Telerik points. 

All the best,
Svett
the Telerik team
RadControls for WinForms Q2'12 release is now live! Check out what's new or download a free trial >>
Tags
GridView
Asked by
Phil
Top achievements
Rank 1
Answers by
Svett
Telerik team
Share this question
or