<divid="treeview"></div><script>$("#treeview").kendoTreeView({dataSource:[{text:"foo",expanded:true,items:[{text:"bar"}]},{text:"baz",expanded:true,items:[{text:"qux"}]}]});var treeview =$("#treeview").data("kendoTreeView");// collapse the item with text "foo"
treeview.collapse(treeview.findByText("foo"));// collapse all items
treeview.collapse(".k-treeview-item");</script>