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

Add buffer between rows in PDF Export

2 Answers 53 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Scott Lapp
Top achievements
Rank 1
Scott Lapp asked on 10 Feb 2010, 04:48 PM
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 Answers, 1 is accepted

Sort by
0
Accepted
Daniel
Telerik team
answered on 10 Feb 2010, 05:35 PM
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.
0
Scott Lapp
Top achievements
Rank 1
answered on 10 Feb 2010, 06:10 PM
This worked perfectly. Thanks
Tags
Grid
Asked by
Scott Lapp
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Scott Lapp
Top achievements
Rank 1
Share this question
or