Add buffer between rows in PDF Export

3 posts, 1 answers
  1. Scott Lapp
    Scott Lapp avatar
    6 posts
    Member since:
    Apr 2007

    Posted 10 Feb 2010 Link to this post

    I am exporting data from a RadGrid to PDF. I got the column formatting set fine. The problem I am having is each row is too close to each other that it is somewhat difficult to distinguish between them.

    How can I add a buffer between each row?

    This could be a blank row or just add a set number of pixels to each row.

    Thanks,

    Scott
  2. Answer
    Daniel
    Admin
    Daniel avatar
    4943 posts

    Posted 10 Feb 2010 Link to this post

    Hello Scott,

    You could add padding to separate the rows:
    bool isExport = false;
    protected void Button1_Click(object sender, EventArgs e)
    {
        isExport = true;
        RadGrid1.MasterTableView.ExportToPdf();
    }
    protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
    {
        if (e.Item is GridDataItem && isExport)
        {
            foreach (TableCell cell in e.Item.Cells)
                cell.Style["padding-top"] = "3mm";
        }
    }

    I hope this helps.

    Best regards,
    Daniel
    the Telerik team

    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
    Follow the status of features or bugs in PITS and vote for them to affect their priority.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Scott Lapp
    Scott Lapp avatar
    6 posts
    Member since:
    Apr 2007

    Posted 10 Feb 2010 Link to this post

    This worked perfectly. Thanks
Back to Top