Resize iFrame in Panel

3 posts, 0 answers
  1. Ray Bezuidenhout
    Ray Bezuidenhout avatar
    6 posts
    Member since:
    Apr 2004

    Posted 23 Feb 2011 Link to this post


    To sum it up: I am trying to resize an iFrame on a RadPane to fit 100% height.  

    The Scenario: My project is based on the Webmail demo, but in the bottom Pane I want to have an iFrame which correctly resizes then the Splitter is dragged.

    I tried to add a client side Javascript block of code on the OnClientResized event of the RadPane, but it does not seem to be triggered and thereby resizing the iFrame.  

    I don't know if it would be easier to use the ContentURL property to use the RadPane as an iFrame, but do not know how to amend the demo to use a datasource to get the URL as I currently use the same DetailsView as in the demo to effect the iFrame src property.  When I set the ContentURL at design time then the Grid does not render any details.  

    Sorry, but this is my first attempt at using the Telerik AJAX controls.

  2. Ray Bezuidenhout
    Ray Bezuidenhout avatar
    6 posts
    Member since:
    Apr 2004

    Posted 24 Feb 2011 Link to this post

    OK, I can confirm that the client Javascript did get triggered.  There was a logical error in the script which meant that the iFrame was incorrectly "identified" and therefore not affected.

  3. DevCraft R3 2016 release webinar banner
  4. Svetlina Anati
    Svetlina Anati avatar
    2795 posts

    Posted 25 Feb 2011 Link to this post

    Hi Ray,

    I am glad to hear that you managed to resolve the problem.

    On a side note, as to your question about the ContentUrl property - indeed, that is exactly what it does - it creates an IFRAME and puts it into the RadPane. After that this IFRAME is resized automatically along with the pane without the need of custom code. You say, however, that you are not sure how to implement it - all you should do is to simply remove your iframe and related to it code and set the ContentUrl to the same page you used to have in your iframe.
    In case you have additional questions, do not hesitate to contact us again.

    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Back to Top