New to Kendo UI for jQueryStart a free 30-day trial

Sets and binds a dataSource to the widget.

Note: Calling this method with an array will not change the loadOnDemand flag, unlike initialization with an array option.

Parameters:dataSourcekendo.data.HierarchicalDataSource

The new dataSource that the widget will bind to

<div id="treeview"></div>
<script>
$("#treeview").kendoTreeView({
  dataSource: [
    { text: "foo", items: [
      { text: "bar" }
    ] }
  ]
});

var treeview = $("#treeview").data("kendoTreeView");

treeview.setDataSource(new kendo.data.HierarchicalDataSource({
  data: [
    { text: "bar", items: [
      { text: "baz" }
    ] }
  ]
}));
</script>
Not finding the help you need?
Contact Support