Edit this page

updateIndeterminate

Updates the indeterminate state of the TreeView checkboxes. Call it after using the insert / remove API on TreeViews with checkChildren: true. Use to improve performance when checking multiple checkboxes through code.

Parameters

node jQuery

Optional. The root of the hierarchy that will be looped through. Allows only a subtree to be processed. The default value is the TreeView root.

Example

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

$(":checkbox").filter(function() {
  var text = $(this).parent().next().text();
  return text != "bar" && text != "foo";
}).prop("checked", true);

var treeview = $("#treeview").data("kendoTreeView");
treeview.updateIndeterminate();
</script>
Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy