Start PrintPreview with Paper in Landscape Mode

2 posts, 1 answers
  1. Florian
    Florian avatar
    14 posts
    Member since:
    Dec 2014

    Posted 18 Aug 2015 Link to this post

    Hi all,

     titel says it all.

     Regards

  2. Answer
    Ralitsa
    Admin
    Ralitsa avatar
    176 posts

    Posted 19 Aug 2015 Link to this post

    Hi Florian,

    Thank you for contacting us. 

    You need to set the Landscape property to true and show the RadPrintPreviewDialog. Here is the code snippet how to achieve it: 
    private void radButton1_Click(object sender, EventArgs e)
    {
        radPrintDocument1.AssociatedObject = this.radGridView1;
        this.radPrintDocument1.DefaultPageSettings.Landscape = true;
        RadPrintPreviewDialog dialog = new RadPrintPreviewDialog();
        dialog.Document = this.radPrintDocument1;
        if (dialog.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
        {
            this.radPrintDocument1.Print();
        }
    }

    Should you have further questions, I would be glad to help.

    Regards,
    Ralitsa
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top