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

PDF -> change file from ajax postback?

1 Answer 44 Views
PDFViewer
This is a migrated thread and some comments may be shown as answers.
Neil
Top achievements
Rank 1
Neil asked on 08 May 2013, 03:21 PM
I've been researching this and haven't found anything to help. So I was wondering if there is a way we can do this with the PDF Viewer control. I have a web form page that uses UpdatePanels. Inside one of the update panels is a grid with transaction items. In another panel is the PDF Viewer. When I click on a row in the grid I want the PDF loaded inside of the PDF Viewer to change. This is happening on partial postback.

So far the only way I can figure out how to do this is to reload the silverlight control and specify a different source. Every time I attempt to use javascript to control the viewer (using ScriptableMember methods) I get javascript errors. However, if I use a static control (say a button on the page) that calls the exact same function it works fine.

Is there a way of getting the PDF Viewer to change the document it is viewing from a partial postback occuring from an UpdatePanel without reloading the whole silverlight control?

Thanks!

1 Answer, 1 is accepted

Sort by
0
Kammen
Telerik team
answered on 13 May 2013, 12:24 PM
Hello Neil,

The fact that you can change the PdfDocumentSource from a static button shows that the problem is not with the RadPdfViewer but something with your logic / UpdatePanel.

1. I think it is not necessary to put RadPdfViewer in UpdatePanel as it does not need postback in order to load a different document.
2. You can try to change the DocumentSource from user interaction, not from the postback. This may solve the problem.

Hope this answers your question.

Regards,
Kammen
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
PDFViewer
Asked by
Neil
Top achievements
Rank 1
Answers by
Kammen
Telerik team
Share this question
or