I didn't find RadPrintDocument

4 posts, 0 answers
  1. Evren
    Evren avatar
    3 posts
    Member since:
    Dec 2011

    Posted 06 Jun 2012 Link to this post

    I  have  Telerik winforms Q3 2011 SP1 version. I want to print a gridview but I didn't find RadPrintDocument. Is there any way gridview printing.
  2. Nikolay
    Admin
    Nikolay avatar
    1804 posts

    Posted 06 Jun 2012 Link to this post

    Hi Evren,

    Thank you for this question.

    The printing functionality of RadGridView and RadScheduler was introduced in Q1 2012 as described in our Release Notes. RadPrintDocument is a part of this functionality so you can find it in Q1 2012.

    I hope this helps.

    Greetings,
    Nikolay
    the Telerik team
    RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Hugo Furth
    Hugo Furth avatar
    31 posts
    Member since:
    Dec 2008

    Posted 23 Sep 2014 Link to this post

    Hi All -

    I didn't find a topic for RadPrintDocument so posting here.

    I am trying to set the papersize to legal before the PrintPreview Method. But it doesn't seem to work.
     
    Also would like to set the font of the data cells (as can be done in the PrintPreview window) but can't find the appropriate protperies. Any help appreciated. Here was my best attempt:

            private void rbPrint_Click(object sender, EventArgs e)
                {
                if (radGridView1.RowCount == 0)
                    return;
                RadPrintDocument d = new RadPrintDocument();
                System.Drawing.Printing.PaperKind k = System.Drawing.Printing.PaperKind.Legal;
                d.PaperSize.RawKind = (int)k;
                d.DefaultPageSettings.PaperSize.RawKind = (int)k;
      
                d.AssociatedObject = radGridView1;
                d.Landscape = true;
                
                radGridView1.PrintPreview(d);
                }
     
    Regards,
    Hugo




  5. Dess
    Admin
    Dess avatar
    1609 posts

    Posted 25 Sep 2014 Link to this post

    Hello Hugo,

    Thank you for writing.

    In order to customize the paper size you should specify the RadPrintDocument.DefaultPageSettings.PaperSize property. Here is a sample code snippet:
    private void radButton1_Click(object sender, EventArgs e)
    {
        if (radGridView1.RowCount == 0)
            return;
        RadPrintDocument d = new RadPrintDocument();          
        d.DefaultPageSettings.PaperSize = new System.Drawing.Printing.PaperSize("A2",420,594);
        d.AssociatedObject = radGridView1;
        d.Landscape = true;
         
        radGridView1.PrintPreview(d);
    }

    You can find additional information in our Telerik Presentation Framework >> Printing Support >> RadPrintDocument section in the online documentation.

    I hope this information helps. Should you have further questions, I would be glad to help.

    Regards,
    Desislava
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
Back to Top