Hello,
I have an angularjs treeview loaded from pre-set data. I need to expand the complete tree once it has finished loaded. For that I put in my controller a function
OnDatabound which gets executed just after the tree has been loaded; I am trying to get a reference to the treeview as shown below but I get an error:
in Html ...
<div kendo-tree-view="treeview" k-options="treeOptions"
in controller ....
$scope.OnDatabound = function(args){
var treeview = args.sender;
treeview.data("kendoTreeView").expand('.k-item'); /* expand all nodes */ <<<<<< error: TypeError : treeview.data is not a function
};
$scope.treeOptions = {
dataTextField: "Name",
dataSource : $scope.FormatAndLoadMyData(theData, "Id", "parentId", 0) ,
dataBound: $scope.OnDatabound
};
How do I get a reference to the treeview ? .. or .. how can I expand all nodes?
Thanks.