0
votes

Hi am using Kendo treeview with Angularjs, i have tree view with checkbox in below hierarchy

Parent1 Child1 Child2

I need like this,

Scenario 1: if user select Parent1-> Child1, Child2 needs to check automatically. This is working fine

Scenario 2: if user select Child1, Child2->Parent1 should not be automatically. i want to prevent parent checked by default, how to do this?

1

1 Answers

0
votes

The only option available is checkChildren that triggers this behavior.

Setting it this to false:

$("#treeview").kendoTreeView({
  checkboxes: {
    checkChildren: false
  }
});

will disable Scenario 2 in this case you will no longer have available the scenario 1.

What you can do is create a small recursive function that goes through all children and check them whenever the parent is clicked.