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

Print as A4

1 Answer 393 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Love
Top achievements
Rank 1
Love asked on 07 Jun 2016, 05:38 AM
How can I change page type to A4 programmatically before printing?

1 Answer, 1 is accepted

Sort by
0
Hristo
Telerik team
answered on 09 Jun 2016, 02:40 PM
Hello Love,

Thank you for writing.

You can create a RadPrintDocument object and set its PaperSize property. Please check my code snippet below:
private void PrintGrid()
{
    RadPrintDocument doc = new RadPrintDocument();
    doc.PaperSize = new System.Drawing.Printing.PaperSize("A4", 210, 297);
    doc.AssociatedObject = this.radGridView1;
    doc.Print();
}

Additional information is available here: TPF | Printing.

I hope this helps. Should you have further questions please do not hesitate to write back.

Regards,
Hristo Merdjanov
Telerik
Check out the Windows Forms project converter, which aids the conversion process from standard Windows Forms applications written in C# or VB to Telerik UI for WinForms. For more information check out this blog post and share your thoughts.
Tags
GridView
Asked by
Love
Top achievements
Rank 1
Answers by
Hristo
Telerik team
Share this question
or