Reputation: 7879
How can I get a TreeView node using a DataItem ID in UI for ASPNET MVC? Obviously the code won't work but I'm looking for something like this:
var treeview = $("#OrganizationTree").data("kendoTreeView");
var node = treeview.GetNodeByDataItemID(1234);
Upvotes: 0
Views: 5737
Reputation: 18402
If your DS has a schema model which defines the id field (or you're using the default),
var dataItem = treeview.dataSource.get(id)
should work.
If you have a dataItem and want to get the DOM node, you're probably looking for findByUid:
treeview.findByUid(dataItem.uid);
Upvotes: 4