Approved
Last Updated: 06 May 2016 13:39 by ADMIN
ADMIN
Dimitar
Created on: 26 Apr 2016 06:32
Category: GridView
Type: Bug Report
1
FIX. RadGridView - the last cell in the exported pdf document is clipped if the margins are set in code.
To reproduce :
public partial class RadForm1 : Telerik.WinControls.UI.RadForm
{
    public RadForm1()
    {
        InitializeComponent();
        radGridView1.DataSource = GetTable();
    }

    private void radButton1_Click(object sender, EventArgs e)
    {
        var exporter = new GridViewPdfExport(radGridView1);
        exporter.FileExtension = "pdf";
        exporter.ShowHeaderAndFooter = true;
        exporter.LeftFooter = GridViewPdfExport.DatePrintedString;
        exporter.FitToPageWidth = true;
        exporter.PageMargins = new Padding(20, 15, 10, 10);
        exporter.RunExport(@"C:\Users\dkaramfi\Desktop\test123.pdf", new PdfExportRenderer());

    }

    static DataTable GetTable()
    {

        DataTable table = new DataTable();
        table.Columns.Add("Dosage", typeof(int));
        table.Columns.Add("Drug", typeof(string));
        table.Columns.Add("Name", typeof(string));
        table.Columns.Add("Name1", typeof(string));
        table.Columns.Add("Name2", typeof(string));
        table.Columns.Add("Name3", typeof(string));
        table.Columns.Add("Name4", typeof(string));


        table.Rows.Add(50, "Enebrel", "Sam", "Sam1", "Sam2", "Sam4", "Sam4");
        table.Rows.Add(25, "Indocin", "David");
        table.Rows.Add(50, "Enebrel", "Sam");
        table.Rows.Add(10, "Hydralazine", "Christoff");
        table.Rows.Add(21, "Combivent", "Janet");
        table.Rows.Add(100, "Dilantin", "Melanie");
        return table;
    }
}

Workaround:
Leave the default margins.
0 comments