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

Export To PDF by javascript

5 Answers 79 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mona
Top achievements
Rank 1
Mona asked on 13 Oct 2008, 11:15 AM
i have problem that i cannt export grid data to pdf file in new explorer by javascript function

function ExportGrid()
{
   var masterTable = $find("<%=RadGrid1.ClientID %>").get_masterTableView();
   masterTable.exportToPdf();

}

i write this function but doesnot work
please replay me as soon as possible
thanks alot

5 Answers, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 13 Oct 2008, 01:33 PM
Hello Mona,

Please test the following code:
<asp:Button ID="Button1" OnClientClick="ExportGrid();return false;" runat="server" Text="Export To PDF" /> 

function ExportGrid() 
    var masterTable = $find("<%=RadGrid1.ClientID %>").get_masterTableView(); 
    masterTable.exportToPdf(); 

Regards,
Daniel
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Mona
Top achievements
Rank 1
answered on 14 Oct 2008, 02:56 PM
sorry this solution does not work at all
please i need solution for this problem as soon as possible
0
Daniel
Telerik team
answered on 14 Oct 2008, 05:35 PM
Hello Mona,

For your convenience I created a very simple example illustrating the needed approach. Please test it locally and let us know whether it works as you expected.

Regards,
Daniel
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Mona
Top achievements
Rank 1
answered on 15 Oct 2008, 08:51 AM
i'm sorry to tell you that this example did not work
please help me
0
Daniel
Telerik team
answered on 15 Oct 2008, 01:10 PM
Hello Mona,

The mentioned example was tested on several machines.

Could you please let us know some details about your configuration:
- browser name and version (ex. Mozilla Firefox 3.02)
- PDF viewer and version (ex. Adobe Acrobat Reader 7.01)
- RadControls type and version (ex. RadControls for ASP.NET AJAX Q2 2008 SP2 or build 1001)

Thus we may be able to provide more to-the-point answer.

Regards,
Daniel
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
Mona
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Mona
Top achievements
Rank 1
Share this question
or