Change Toggle Icon

2 posts, 0 answers
  1. Tommy Walsh
    Tommy Walsh avatar
    7 posts
    Member since:
    Sep 2008

    Posted 13 Apr 2009 Link to this post

    I'd like to change (or possibly remove) the toggle icon (+/- next to the text) on one (but not all) of my TreeViews. Is this possible?



  2. Atanas Korchev
    Atanas Korchev avatar
    8462 posts

    Posted 13 Apr 2009 Link to this post

    Hi Tommy Walsh,

    You can achieve this using JavaScript. Here is some sample code:
    <script type="text/javascript">
                function treeViewLoaded(sender, args)
                    var node = sender.findNodeByText("Root Node");
                    node.get_toggleElement().style.display = "none";
            <telerik:RadTreeView runat="server" ID="RadTreeView1" OnClientLoad="treeViewLoaded">
                    <telerik:RadTreeNode Text="Root Node" Expanded="true">
                            <telerik:RadTreeNode Text="Child Node 1" />
                            <telerik:RadTreeNode Text="Child Node 2" />

    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Back to Top