Not showing all content

5 posts, 1 answers
  1. Dan Normington
    Dan Normington avatar
    6 posts
    Member since:
    Jun 2009

    Posted 29 Jun 2009 Link to this post

    I'm using the HTMLPlaceHolder control to display custom content from our content management system. When the html renders in the control I don't see all of it. There is no vertical scrollbar. So I ended up adding a scrollviewer around the htmlplaceholder and it only scrolls a little bit. Is there something I need to do?

    I have evaluated many html host controls in the past month and this seems to be a common problem with the ones I've looked into. They all seem to render URL based sources just fine, but when It comes to using custom html content I seem to be running into the same issue.

    Thanks in advance.
  2. Answer
    Valentin.Stoychev
    Admin
    Valentin.Stoychev avatar
    2198 posts

    Posted 29 Jun 2009 Link to this post

    Hello Dan Normington,

    Can you wrap the content that you are displaying into a DIV with overflow:auto. Somthing like that:

    String html = "<div style='overflo:auto'>" + CMSHtmlContent + "</div>";

    Please let us know if this works for you.

    All the best,
    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.
  3. DevCraft banner
  4. Dan Normington
    Dan Normington avatar
    6 posts
    Member since:
    Jun 2009

    Posted 29 Jun 2009 Link to this post

    After I posted I noticed another thread that you posted an example to with the following code after InitializeComponent:

     

    RadHtmlPlaceholder1.HtmlPresenter.SetStyleAttribute(

     

    "overflow", "auto");

     

    RadHtmlPlaceholder1.HtmlPresenter.SetAttribute(

     

    "id", "RadHtmlPlaceholder1");

     

     


    Thanks for posting that. It did work for me, however, I'm getting a horizontal scrollbar that is very small. I'd like to get rid of that. Is there something I can do for this?

    basically what is happening is that vertical scrollbar is taking up horizontal real estate.

    Thanks in advance.
  5. Valentin.Stoychev
    Admin
    Valentin.Stoychev avatar
    2198 posts

    Posted 29 Jun 2009 Link to this post

    Hi Dan Normington,

    In this case you can set the "overflow-x" attribute to "hidden", just like you did with the "overflow" attribute.

    Check here for the usage of the overflow attributes:
    http://www.brunildo.org/test/Overflowxy2.html

    Please let us know how it goes.

    Sincerely yours,
    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.
  6. Dan Normington
    Dan Normington avatar
    6 posts
    Member since:
    Jun 2009

    Posted 29 Jun 2009 Link to this post

    Thanks for the reply. Because my data is in xml, I apply a stylsheet prior to binding the html to the placeholder control. What I ended up doing was the following in my xslt. This seems to place the vertical scrollbar perfectly. Thank you very much for your help.

    <

     

    div style="height:100%;overflow:auto">

     

    <

     

    xsl:apply-templates/>

    </

     

    div>

     

Back to Top
DevCraft banner