I have an angular-kendo treeview declared on my page like so:
<div id="treeview" kendo-tree-view="ktv" k-options="treeDataScope"></div>
I would like to expand the root node when the page loads. Angular Kendo examples are few and far between... The Kendo UI examples say to do something like this:
var treeview = $("#treeview").data("kendoTreeView");
// expand the item with text "foo"
treeview.expand(treeview.findByText("foo"));
// expand all loaded items
treeview.expand(".k-item");
I'm (obviously) not declaring the tree view in that way, so I don't have a reference to "treeview" and nothing that I do seems to be able to get that reference. I can get a reference to the "treeview" div, but can't seem to figure out how to get reference to the kendo "treeview" that has the "findByText" method.
Attempting to see if I could find the method, I tried the follow:
$("#treeview").findByText;
$("#treeview").kendoTreeView().findByText;
angular.element("#treeview").findByText;
angular.element("#treeview").kendoTreeView().findByText;
But all end up as undefined.
Any help would be appreciated!