Icon for nodes that does not have a children

2 posts, 0 answers
  1. thomson
    thomson avatar
    22 posts
    Member since:
    Jun 2009

    Posted 14 Mar 2014 Link to this post

             In the treeview we have nodes that has child elements not visible , For this we add icon using rtPlus and rtMinus class. On the same treeview we have nodes that does not have any child.We need to place an icon . How do i target these nodes in CSS?

  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 17 Mar 2014 in reply to thomson Link to this post

    Hi thomson,

    Please try the following JavaScript to add an icon to the RadTreeNode which doesn't have any child.

    function pageLoad() {
        var tree = $find("<%=RadTreeView1.ClientID %>");
        for (i = 0; i < tree.get_allNodes().length; i++) {
            if (tree.get_allNodes()[i]._hasChildren() == false) {
                tree.get_allNodes()[i].set_imageUrl("delete-icon.png");//set the icon url here

  3. DevCraft R3 2016 release webinar banner
Back to Top