New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

Make RadTreeView Occupy the Entire Window Height

You can use the following JavaScript code to achieve the desired effect:

function resizeTree() {
    var treeDiv = document.getElementById("RadTreeView1");
    var intCompensate = 6;
    var documentObj = document.documentElement;
    if ((window.opera) || (document.all && (!(document.compatMode && document.compatMode == "CSS1Compat")))) 
        documentObj = document.body;
    } = (parseInt(documentObj.clientHeight) - intCompensate) + "px"; = "auto";

Add the following attributes to the tag of the page:

<body ms_positioning="GridLayout" onload="resizeTree()" onresize="resizeTree()" topmargin="0"
    leftmargin="0" bottommargin="0">

Please take into account that you should use the correct client-side ID of the TreeView control. In this case it is RadTreeView1. The best way to get the client-side ID of the TreeView is to get it from the HTML output of the page where the TreeView resides.

In this article
Not finding the help you need? Improve this article