Tree View

2 posts, 0 answers
  1. swarna priya
    swarna priya avatar
    3 posts
    Member since:
    May 2015

    Posted 18 May 2015 Link to this post


     I wanted to expand all the child node of the parent node whenever the top node is selected. Please advice 


    thanks in advance



  2. Ivan Danchev
    Ivan Danchev avatar
    1617 posts

    Posted 20 May 2015 Link to this post

    Hello Swarna,

    Please review the code in the following code snippet, which demonstrates how you can expand the clicked RadTreeView parent node and its child nodes:
    <script type="text/javascript">
        function OnClientNodeClicked(sender, eventArgs) {
            var parentNode = eventArgs.get_node();
            var allNodes = parentNode.get_allNodes();
            for (var i = 0; i < allNodes.length; i++) {
                var node = allNodes[i];
        <telerik:RadTreeView ID="RadTreeView1" runat="server" EnableDragAndDrop="True" OnClientNodeClicked="OnClientNodeClicked"
            MultipleSelect="True" EnableDragAndDropBetweenNodes="True">
                <telerik:RadTreeNode runat="server" Text="Root1">
                        <telerik:RadTreeNode runat="server" Text="Child 1.1">
                                <telerik:RadTreeNode runat="server" Text="Child 1.1.1">
                                <telerik:RadTreeNode runat="server" Text="Child 1.1.2">
                        <telerik:RadTreeNode runat="server" Text="Child 1.2">
                        <telerik:RadTreeNode runat="server" Text="Child 1.3">
                <telerik:RadTreeNode runat="server" Text="Root2">
                        <telerik:RadTreeNode runat="server" Text="Child 2.1">
                        <telerik:RadTreeNode runat="server" Text="Child 2.2">

    Ivan Danchev
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top