findByText

Searches for a node that has specific text.

Parameters

text String

The text that is being searched for.

Returns

jQuery All nodes that have the text.

Example

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

var treeview = $("#treeview").data("kendoTreeView");
// find the node with text "foo"
var foo = treeview.findByText("foo");
/* The result can be observed in the DevTools(F12) console of the browser. */
console.log(foo);
</script>
In this article