This is a migrated thread and some comments may be shown as answers.

Start PrintPreview with Paper in Landscape Mode

1 Answer 116 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Florian
Top achievements
Rank 1
Florian asked on 18 Aug 2015, 03:03 PM

Hi all,

 titel says it all.

 Regards

1 Answer, 1 is accepted

Sort by
0
Accepted
Ralitsa
Telerik team
answered on 19 Aug 2015, 11:46 AM
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
Tags
GridView
Asked by
Florian
Top achievements
Rank 1
Answers by
Ralitsa
Telerik team
Share this question
or