Export To PDF locks UI Thread

2 posts, 0 answers
  1. Phil
    Phil avatar
    2 posts
    Member since:
    Jun 2012

    Posted 24 Jul 2012 Link to this post

    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;
  2. Svett
    Svett avatar
    728 posts

    Posted 27 Jul 2012 Link to this post

    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,
    the Telerik team
    RadControls for WinForms Q2'12 release is now live! Check out what's new or download a free trial >>
Back to Top