Resize The iframe in Radsplitter

9 posts, 0 answers
  1. Shawn
    Shawn avatar
    4 posts
    Member since:
    Jul 2010

    Posted 06 Jul 2010 Link to this post

    Is there a way to re-size the height of the iframe in a radpane based on the content being loaded? 
  2. Dobromir
    Admin
    Dobromir avatar
    1633 posts

    Posted 08 Jul 2010 Link to this post

    Hi Shawn,

    In order to resize the RadPane's <iframe> according to its content, you need to get the page loaded inside the iframe and get its size. Please find an explanation of how to achieve this in the following KB:
    Referencing content page in a splitter pane from the parent page and vice versa

    Then you can use the solution provided in this KB that shows how to initially resize splitter according to its content.

    Kind regards,
    Dobromir
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Shawn
    Shawn avatar
    4 posts
    Member since:
    Jul 2010

    Posted 12 Jul 2010 Link to this post

    Hi Dobromir ,

    Thanks for you reply, but it doesn't seem to be working. No matter what I do the div that contains the iframe and the iframe have an inline style set to 398px. I have the height of the radpane set to 100%. Do you know where the inline style of 398px is being set?
  5. Dobromir
    Admin
    Dobromir avatar
    1633 posts

    Posted 14 Jul 2010 Link to this post

    Hi Shawn,

    By design, RadSplitter is calculating its size during the initialize of the control and the width and height are set as an inline style to the elements. Width and height values of 400px are RadSplitter's default values and one of the most common reason for this behavior is incorrect registration of the control.

    Could you please provide a sample page where the problem occurs so we can investigate it further?

    Looking forward to hearing from you,
    Dobromir
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  6. Shawn
    Shawn avatar
    4 posts
    Member since:
    Jul 2010

    Posted 26 Jul 2010 Link to this post

    Hi Dobromir,

    Please refer to this post for a sample page:

    http://www.telerik.com/community/forums/aspnet-ajax/splitter/radsplitter-radpane-height-autoset-to-398px-if-contenturl-property-is-set.aspx#1279573

    Thanks!
  7. Dobromir
    Admin
    Dobromir avatar
    1633 posts

    Posted 28 Jul 2010 Link to this post

    Hi Shawn,

    Thank you for the additional information.

    When the ContentUrl property is set to point to an external URL (not from the application), it is not possible to access the document loaded inside the <iframe>. This is not restriction to the RadSplitter, but a general browser behavior to prevent cross server script attacks. If this is the case, there is no solution to this scenario.

    If you have loaded a page from the same domain, where the page containing the splitter resides, you need to get reference to the splitter from the inner page, and resize it according to the page's size. For your convenience I have prepared a sample project implementing this approach.

    Kind regards,
    Dobromir
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  8. Shawn
    Shawn avatar
    4 posts
    Member since:
    Jul 2010

    Posted 28 Jul 2010 Link to this post

    Hi Dobromir,

    Thanks, that worked!

    Shawn
  9. Farouk
    Farouk avatar
    24 posts
    Member since:
    Jun 2012

    Posted 21 Apr 2011 Link to this post

    hey..

    ok.. in my case there is an another problem with the default height of the radpane..

    i use the radpane in a master-page and inside the pane is a contentplaceholder.. so your example with the javascript wouldn't work and i don't get the javascript edited that it works.. is there a way to resize the content or better to resize the content from the content of the placeholder by javascript?

    i've tried a lot of stuff.. maybe in the wrong way.. :)

    regards,
    basti
  10. Dobromir
    Admin
    Dobromir avatar
    1633 posts

    Posted 26 Apr 2011 Link to this post

    Hi Basti,

    The approach that need to be used to resize the splitter according its content is the same for scenarios with Master/Content pages and a single aspx page. An example of this approach is available in the following KB article:
    Initially Resize the RadSplitter according to its content

    Due to the fact that the Master page and the Content page are combined in a single HTML file before sending to the browser - please find more detailed information regarding the ASPX Master Pages in the following article:
    http://msdn.microsoft.com/en-us/library/wtxbf3hh.aspx

    For your convenience I have prepared a sample Master / Content page implementing the solution from the above mentioned KB Article, please find it attached.

    Greetings,
    Dobromir
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Back to Top
UI for ASP.NET Ajax is Ready for VS 2017