How to Change Page Margin before Print

4 posts, 1 answers
  1. Feri
    Feri avatar
    2 posts
    Member since:
    Mar 2016

    Posted 01 Mar Link to this post

    How can I change page margins before radGridView.PrintPreview()?
  2. Answer
    Stefan avatar
    2890 posts

    Posted 01 Mar Link to this post

    Hi Feri,

    Thank you for writing.

    To do that you should utilize the RadPrintDocument API:
    RadPrintDocument doc = new RadPrintDocument();
    doc.Margins.Left = 200;
    radGridView1.Print(false, doc);

    More information on the matter is available here:

    I hope that you find this information useful. Should you have any other questions, do not hesitate to contact us.

    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
  4. rosa
    rosa avatar
    9 posts
    Member since:
    Dec 2016

    Posted 1 day and 17 hours ago Link to this post

    Hi guys, 

    I've used bellow code for setting paper size and margin for printing the content in Radrichtexteditor. Actually for this purpose i've applied Radprintdocument. But the margin dosen't work

    please help me about this problem

  5. rosa
    rosa avatar
    9 posts
    Member since:
    Dec 2016

    Posted 1 day and 16 hours ago in reply to rosa Link to this post

    my code is here;

    private void PrintA4_Click(object sender, EventArgs e)     

                PaperSize ps = new PaperSize();            ps.RawKind = (int)PaperKind.A4;            radPrintDocument1.DefaultPageSettings.PaperSize = ps;            radPrintDocument1.DefaultPageSettings.Landscape = false;            //radPrintDocument1.DefaultPageSettings.Margins = new System.Drawing.Printing.Margins(10, 10, 10, 10);            radPrintDocument1.Margins.Left = 0;            radPrintDocument1.Maregins.Top = 0;            radPrintDocument1.Print();                     }

Back to Top