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

Blank PDF file

1 Answer 24 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Appu
Top achievements
Rank 1
Appu asked on 30 Jun 2009, 02:02 PM
Hi
        I am using Radgrid which has the option to export pdf. I am using commanditem template having linkbutton control.
When i click the button i hav to export the existing grid data to PDF file. But once after i click the link button the pdf file opens but it lokked like blank sheet.

if (e.Item is GridCommandItem)
        {
            if (e.CommandName == "lnkExportPDF")
            {
               RadGrid1.ExportSettings.ExportOnlyData = true;
              RadGrid1.ExportSettings.IgnorePaging = true;
               RadGrid1.ExportSettings.OpenInNewWindow = true;
               RadGrid1.ExportSettings.Pdf.Title = "Billing Report";
              RadGrid1.ExportSettings.Pdf.PageLeftMargin=Unit.Pixel(10);
              RadGrid1.ExportSettings.Pdf.PageRightMargin = Unit.Pixel(10);
               RadGrid1.ExportSettings.Pdf.PageWidth = Unit.Pixel(3500);
                this.RadGrid1.MasterTableView.ExportToPdf();

            }
        }

But the Export pdf works with ordinary button placed outside of radgrid.It shows complete data in the PDF file. But it doesnt work when i have created the link button as CommandItemTemplate.

Plz direact me as soon as possible

Regards,
Appu

1 Answer, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 30 Jun 2009, 03:01 PM
Hello Appu,

Let us know how you bind your RadGrid. Are you using simple data binding?

Regards,
Daniel
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
Appu
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or