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

Reporting Content Height

7 Answers 62 Views
HTMLPlaceHolder
This is a migrated thread and some comments may be shown as answers.
Dennis
Top achievements
Rank 1
Dennis asked on 11 Aug 2009, 03:12 PM
I know that another thread indicated that this was not a support property of the HTMLPlaceHolder, but I think that to be useful it need to report the actual height taken (and auto-expand as needed) based on the width it consumes or is provided. So, I would like to second that this is requested functionality; otherwise, this control provides no value since I cannot determine how to size the height without knowing the content height.

7 Answers, 1 is accepted

Sort by
0
Valentin.Stoychev
Telerik team
answered on 11 Aug 2009, 03:15 PM
Hi Dennis,

Just to clarify - are you talking about the case when an external url is loaded inside the RadHtmlPlaceholder?

Best wishes,
Valentin.Stoychev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Dennis
Top achievements
Rank 1
answered on 11 Aug 2009, 03:27 PM
No, I have a HTML string stored that I just want rendered. So, I am simply assigning the string to the HtmlSource property of the control. Doing it this way, is there a way to autosize the height?
0
Accepted
Valentin.Stoychev
Telerik team
answered on 12 Aug 2009, 06:05 AM
Hi Dennis,

It is should be working by default this way. Can you send as a sample code where it behaves differently.

Here is our test code:
XAML:
<StackPanel> 
            <Rectangle Fill="Yellow" Width="100" Height="100"></Rectangle> 
            <telerik:RadHtmlPlaceholder x:Name="RadHtmlPlaceholder1"/>  
            <Rectangle Fill="Red" Width="100" Height="100"></Rectangle> 
            </StackPanel> 

C#:
public MainPage()  
        {  
            InitializeComponent();  
            RadHtmlPlaceholder1.HtmlSource = String.Format(@"<div style=""width:50px;height:50px;background-color:white;"">test</div>");  
        } 


Best wishes,
Valentin.Stoychev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Dennis
Top achievements
Rank 1
answered on 12 Aug 2009, 01:19 PM
This seems to work in all but 1 case. If the source content is an empty string, it does not collapse the Placeholder, it keeps it expanded at about 300 pixels. So, RadHtmlPlaceholder1.HtmlSource = String.Format (String.Empty); does not return what I would expect.

I am still having some other height issues, but I think they may be on my side. So, I will go with this for now and see what happens. Thanks.
0
Dennis
Top achievements
Rank 1
answered on 12 Aug 2009, 02:26 PM
The problem that I am experiencing is when the RadHtmlPlaceholder is placed into a Docking Pane. It does not size its height correctly. I am going to open a ticket with a test project for you. Thanks.
0
Alexander Kotchkin
Top achievements
Rank 1
answered on 27 Feb 2011, 06:54 PM
I am having the same issue.

Thanks,

Jesus
0
Tina Stancheva
Telerik team
answered on 02 Mar 2011, 03:14 PM
Hi Jesus Janne,

Can you please elaborate on your scenario and the issue you experience with the RadHtmlPlaceHolder? If you can share a sample code snippet illustrating your case, we will be able to investigate it and provide you with a suited solution.

Thank you in advance.

Kind regards,
Tina Stancheva
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!
Tags
HTMLPlaceHolder
Asked by
Dennis
Top achievements
Rank 1
Answers by
Valentin.Stoychev
Telerik team
Dennis
Top achievements
Rank 1
Alexander Kotchkin
Top achievements
Rank 1
Tina Stancheva
Telerik team
Share this question
or