(updated) Advanced RadGridView Print and Export

5 posts, 0 answers
  1. Roberto Pantalena
    Roberto Pantalena 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. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    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. Amitkumar
    Amitkumar 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. Amitkumar
    Amitkumar 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. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    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