(updated) Advanced RadGridView Print and Export

Thread is closed for posting
5 posts, 0 answers
  1. D4879D1E-133F-402E-A124-0ED2455DFA6B
    D4879D1E-133F-402E-A124-0ED2455DFA6B avatar
    19 posts
    Member since:
    Jul 2009

    Posted 08 May 2012 Link to this post

    Hi, here is attached a sample project to export and print data from a RadGridView..
    If you take a look in the code behind there are many type of exports: pdf, excel, and print.


    I updated this project because the "export to Excel" functionality doesen't export the grouped data, so I have implemented this feature.
    Greetings
  2. 03C6DCCC-BDEA-48C2-8B34-F4A2A58C63A8
    03C6DCCC-BDEA-48C2-8B34-F4A2A58C63A8 avatar
    3769 posts
    Member since:
    Aug 2017

    Posted 08 May 2012 Link to this post

    Hello Roberto,

     Thank you very much! I have updated your points accordingly.

    Greetings,
    Didie
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. E00B310A-3833-4919-AA51-A7CCBF648281
    E00B310A-3833-4919-AA51-A7CCBF648281 avatar
    66 posts
    Member since:
    Aug 2009

    Posted 21 Aug 2012 Link to this post

    Hi your application is awesome, 
    But when I Invisible any column, still in export it is exporting.
    How I can restrict visible false column, It should not export. my code below.

    private void Button2_Click(object sender, RoutedEventArgs e)
           {
               PrintExportExtensions ex = new PrintExportExtensions();
     
               var hiddenColumns = new[] { "CustomerID" };
               foreach (var columnName in hiddenColumns)
               {
                   this.RadGridView1.Columns[columnName].IsVisible = false;
               }
            
               ex.ExportToExcel(RadGridView1);
     
               foreach (var columnName in hiddenColumns)
               {
                   this.RadGridView1.Columns[columnName].IsVisible = true;
               }
               
           }
  4. E00B310A-3833-4919-AA51-A7CCBF648281
    E00B310A-3833-4919-AA51-A7CCBF648281 avatar
    66 posts
    Member since:
    Aug 2009

    Posted 22 Aug 2012 Link to this post

    HI
    If we have Grid Footer it is not exporting in your application. how we can implement. export Group Footer.
  5. 03C6DCCC-BDEA-48C2-8B34-F4A2A58C63A8
    03C6DCCC-BDEA-48C2-8B34-F4A2A58C63A8 avatar
    3769 posts
    Member since:
    Aug 2017

    Posted 26 Dec 2012 Link to this post

    Hello,

    In addition to the original approach presented, I have attached a demo project showing how you can implement a Print/PrintPreview and Export with the help of RadDocument and RadRichTextBox.

    All the best,
    Didie
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top

This Code Library is part of the product documentation and subject to the respective product license agreement.