PDF -> change file from ajax postback?

2 posts, 0 answers
  1. Neil
    Neil avatar
    34 posts
    Member since:
    Sep 2012

    Posted 08 May 2013 Link to this post

    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?

  2. Kammen
    Kammen avatar
    312 posts

    Posted 13 May 2013 Link to this post

    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.

    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top