How to auto expand selected item in dropdowntree

1 Answer 18 Views
DropDownTree
Lee
Top achievements
Rank 2
Bronze
Bronze
Bronze
Lee asked on 22 Mar 2024, 01:36 PM

I have a kendo dropdown tree with a selected value that was there on initialization. When the user clicks on the dropdown for the first time, I want the list to auto expand the selected node so the user can see it the child item. How do I do this? 

Similarly, I would like the user to be able to click on a parent node and, instead of selecting the parent node, since that isn't allowed in my case, it should just expand so they can see the children. 

1 Answer, 1 is accepted

Sort by
0
Neli
Telerik team
answered on 27 Mar 2024, 08:16 AM

Hi Lee,

You can take a look at the following forum thread where such an issue is discussed:

- https://www.telerik.com/forums/expand-node-with-single-click#4708390

As in the thread an old version is used here you will find a Dojo example using the latest version and classes: - https://dojo.telerik.com/@NeliK/ITuYUMOj

In addition, please find below the article where the fields of the DropDownTree items are described. If you set the expanded option to true for each item it they will expanded when rendered. 

- https://docs.telerik.com/kendo-ui/controls/dropdowntree/items

I hope this helps.

Regards,
Neli
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Kendo family, check out our getting started resources
Tags
DropDownTree
Asked by
Lee
Top achievements
Rank 2
Bronze
Bronze
Bronze
Answers by
Neli
Telerik team
Share this question
or