How to get data item from select event of DropDownTree

1 Answer 25 Views
DropDownTree
Francis
Top achievements
Rank 1
Francis asked on 19 Feb 2022, 12:02 AM

The title says it all

How to get the data item from the node in the select event?

1 Answer, 1 is accepted

Sort by
0
Neli
Telerik team
answered on 23 Feb 2022, 03:25 PM

Hello Francis,

To get the dataItem of a selected node in our DropDownTree you need to utilize it's internal TreeView. Then pass the e.node of the select event to the dataItem method.

 select: function(e) {
          var treeview = e.sender.treeview;
          console.log(treeview.dataItem(e.node));
}

Here is a Dojo example where the above is demonstrated.

Let me know in case you have additional questions on the matter.

Regards,
Neli
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
DropDownTree
Asked by
Francis
Top achievements
Rank 1
Answers by
Neli
Telerik team
Share this question
or