Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > Splitter > How to fill RadEditor into radpane

Answered How to fill RadEditor into radpane

Feed from this thread
  • Posted on Mar 1, 2011 (permalink)

    Hi,

    I have a radpane in radsplitter, and radeditor in the radpane. How to fill radeditor in the radpane 100% when radpane's is resized (splitterbar is horizontal)?

    York
     

    Reply

  • Answer Marin Bratanov Marin Bratanov admin's avatar

    Posted on Mar 2, 2011 (permalink)

    Hi York,

    This can be achieved by a small JavaScript function attached to the OnClientResized event of the RadPane (and to the OnClientLoad to ensure uniform display even without resizing).

    I have attached a simple page illustrating the approach and containing the function. I hope it will achieve the desired effect. If it doesn't let me know if I have misunderstood your objective.


    Best wishes,
    Marin
    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!
    Attached files

    Reply

  • Posted on Mar 2, 2011 (permalink)

    Thanks a lot, Marin. It is working fine.

    One more question, I tried to fill radpane with radtreeview. When I used
    var tree = $find("<%=RadTreeView1.ClientID %>");
    tree.style.height = "100px";
    It crushed because tree is null. But when used
    var tree = document.getElementById("RadTreeView1");
    tree.style.height = "100px";
    It worked fine. Why is that?

    Reply

  • Answer Marin Bratanov Marin Bratanov admin's avatar

    Posted on Mar 7, 2011 (permalink)

    Hello York,

    To get a null object you have probably attempted to get a reference to the object with the $find() method before the controls are initialized.

    On the other hand, you are actually trying to set a CSS style to an HTML element, so you need an object with a reference to an HTML element, not to a JavaScript object, as these objects do not have styles. This means that you must use the $get() method (a shortcut to the getElementById() method you are using) to get the reference.

    On the difference between these methods you can read in the MSDN articles on $find(), getElementById() and in this blog post.

    Kind regards,
    Marin
    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!

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > Splitter > How to fill RadEditor into radpane
Related resources for "How to fill RadEditor into radpane"

ASP.NET Splitter Features   |  Documentation   |  DemosStep-by-step Tutorial  ]