Drop Expand/Collapse Image From Root Node

4 posts, 0 answers
  1. Andrew
    Andrew avatar
    24 posts
    Member since:
    Jun 2009

    Posted 15 Jun 2009 Link to this post

    Can anyone think of a way to drop the expand/collapse image from the root node of a tree view only so that the root item is sitting by itself without both the option to expand/collapse the tree and without the image which would do so.  I still want the expand/collapse image for all sub sections of the tree just not for when I have a root node which would literaly collapse the entire tree to nothing.

    Any thoughts?
    Andrew Nagel
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 16 Jun 2009 Link to this post

    Hi Andrew Nagel,

    Try adding following javascript side code in client-side pageLoad() function as shown below.

    <script language="javascript" type="text/javascript"
    function pageLoad() 
        var treeView = $find("<%=RadTreeView1.ClientID%>"); 
        var node = treeView.get_nodes().getNode(0); 
        var toggleElement = node.get_toggleElement(); 
        if (toggleElement) 
        toggleElement.style.display = "none";  

  3. Krishna
    Krishna avatar
    2 posts
    Member since:
    Sep 2014

    Posted 25 Sep 2014 in reply to Shinu Link to this post


    Showing error Error 4 The name 'RadTreeView1' does not exist in the current context C:\Users\Xplore\Desktop\Checkboxlist\CheckBox.aspx 203
  4. Hristo Valyavicharski
    Hristo Valyavicharski avatar
    975 posts

    Posted 30 Sep 2014 Link to this post

    Hi Krishna,

    What if you replace <%=RadTreeView1.ClientID%> with <%# RadTreeView1.ClientID%>

    Do you get the same error?

    Hristo Valyavicharski

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top