remove

Removes a node from the widget.

Parameters

node jQuery|Element|String

The node that is to be removed.

Example

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

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

var bar = treeview.findByText("bar");

treeview.remove(bar);

/* The result can be observed in the DevTools(F12) console of the browser. */
console.log($("#treeview").find(".k-item").length); // logs 1
</script>
In this article