This is a migrated thread and some comments may be shown as answers.

Collapsing Rad Drop Down Tree nodes except the clicked node

1 Answer 119 Views
DropDownTree
This is a migrated thread and some comments may be shown as answers.
Pradeep
Top achievements
Rank 1
Pradeep asked on 29 Mar 2018, 03:51 PM

Hi,

I have rad drop down tree as below. When I click on one node in the drop down tree I am able to see the parent node getting expanded by using below client side script and if i click on other node the script executes and node gets expanded. Is there a way I can collapse all other nodes except the current clicked node?

 

<telerik:RadDropDownTree RenderMode="Lightweight" ID="OfficeDropDownPrgFilter" runat="server" Width="500px"
                   ExpandNodeOnSingleClick="true"  AutoPostBack="true" OnClientEntryAdded="OnClientEntryAdded1" 
                    EnableFiltering="true" OnEntryAdded="OfficeDropDownPrgFilter_EntryAdded"> 
                    <DropDownSettings OpenDropDownOnLoad="true"  />
                    <FilterSettings Highlight="Matches" Filter="Contains" EmptyMessage="Type here to filter" />
                </telerik:RadDropDownTree> 

 

function OnClientEntryAdded1(sender, args) {
var path = args.get_entry()._fullPath;
var item = sender.get_embeddedTree().findNodeByText(args.get_entry().get_text());
var node = item.get_parent();
node.expand();
}

 

 

 

1 Answer, 1 is accepted

Sort by
0
Pradeep
Top achievements
Rank 1
answered on 03 Apr 2018, 02:01 PM
Dont we have any feasibility for achieving the above functionality? 
Tags
DropDownTree
Asked by
Pradeep
Top achievements
Rank 1
Answers by
Pradeep
Top achievements
Rank 1
Share this question
or