How to export radgridview to pdf on a button click in c# winforms

3 posts, 0 answers
  1. Srinath
    Srinath avatar
    1 posts
    Member since:
    Oct 2012

    Posted 05 Oct 2012 Link to this post

    private void button1_Click(object sender, EventArgs e)
            {

                ExportToPDF exporter = new ExportToPDF(this.radGridView1);
                exporter.FileExtension = "pdf";
                //exporter.HiddenColumnOption = Telerik.WinControls.UI.Export.HiddenOption.DoNotExport;
                exporter.FitToPageWidth = true;
                string fileName = "c:\\Directory-information.pdf";
                exporter.RunExport(fileName);

            }

    Im beginner in .net, what ever experienced people teach is me what I learn. Help me with this issue , I will be very much thankful to you all.
  2. Stefan
    Admin
    Stefan avatar
    2911 posts

    Posted 10 Oct 2012 Link to this post

    Hello Srinath,

    Thank you for writing.

    The code provided works correctly on my end. Could you please specify what is the issue that you experience?

    More information about the exporting mechanism can be found here: http://www.telerik.com/help/winforms/gridview-exporting-data-export-to-pdf.html.

    I hope this helps.
     
    All the best,
    Stefan
    the Telerik team
    RadControls for WinForms Q2'12 release is now live! Check out what's new or download a free trial >>
  3. Jeremiah
    Jeremiah avatar
    1 posts
    Member since:
    Feb 2019

    Posted 19 Feb 2019 Link to this post

    ZetPDF.com is the best PDF library in the market. I have tried many of others and they either aren’t as simple or simply don’t have the features like ZetPDF.com
Back to Top