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

Resize The iframe in Radsplitter

9 Answers 160 Views
Splitter
This is a migrated thread and some comments may be shown as answers.
Shawn
Top achievements
Rank 1
Shawn asked on 06 Jul 2010, 08:40 PM
Is there a way to re-size the height of the iframe in a radpane based on the content being loaded? 

9 Answers, 1 is accepted

Sort by
0
Dobromir
Telerik team
answered on 08 Jul 2010, 11:13 AM
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
0
Shawn
Top achievements
Rank 1
answered on 12 Jul 2010, 07:42 PM
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?
0
Dobromir
Telerik team
answered on 14 Jul 2010, 01:47 PM
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
0
Shawn
Top achievements
Rank 1
answered on 26 Jul 2010, 10:28 PM
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!
0
Dobromir
Telerik team
answered on 28 Jul 2010, 04:26 PM
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
0
Shawn
Top achievements
Rank 1
answered on 28 Jul 2010, 07:33 PM
Hi Dobromir,

Thanks, that worked!

Shawn
0
Farouk
Top achievements
Rank 1
answered on 21 Apr 2011, 01:27 PM
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
0
Dobromir
Telerik team
answered on 26 Apr 2011, 12:40 PM
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.

0
EZECHIAS
Top achievements
Rank 1
answered on 28 May 2018, 02:46 AM

use this rule to resize the height for the radpane:

.rspPane div {
    height: auto !important;
}

Tags
Splitter
Asked by
Shawn
Top achievements
Rank 1
Answers by
Dobromir
Telerik team
Shawn
Top achievements
Rank 1
Farouk
Top achievements
Rank 1
EZECHIAS
Top achievements
Rank 1
Share this question
or