observableHierarchy
Creates an ObservableArray instance that is bound to a HierarchicalDataSource. Required to bind a HierarchicalDataSource-enabled widget (such as the Kendo UI TreeView) to a view-model.
Example
<div data-role="treeview" data-bind="source: products"></div>
<script>
var viewModel = kendo.observable({
products: kendo.observableHierarchy([
{
text: "foo",
items: [
{ text: "bar" }
]
},
{ text: "baz" }
])
});
kendo.bind(document.body, viewModel);
</script>
Parameters
array Array
The array that will be converted to an ObservableArray.