Edit this page

Check Nodes Programmatically

The following example demonstrates how to programmatically select the checkbox of a TreeView node.

Example
  <div id="tree"></div>

  <script>
    $("#tree").kendoTreeView({
      checkboxes: {
        checkChildren: true
      },

      dataSource: {
        data: [
          { text: "Foo", expanded: true, items: [
            { text: "Bar" },
            { text: "Baz" }
          ] }
        ]
      }
    });

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

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

    treeview.dataItem(bar).set("checked", true);
  </script>

See Also

For more runnable examples on the Kendo UI TreeView, browse its How To documentation folder.

Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve the information

close
Dummy