Hi Shamil,
Thank you for contacting Syncfusion support.
We have analyzed your requirements and prepared a sample based on that.
Query-1: Checkboxes should be enabled only in child nodes
For this case, you can disable the check box for the parent node in the created event of treeview. Please find the code snippet
let liEle = this.treevalidate.element.querySelectorAll('li');
for (let i = 0; i < liEle.length; i++) {
if (liEle[i].classList.contains('e-level-1')) {
let element = liEle[i].querySelector('.e-checkbox-wrapper');
if (element)
element.parentElement.removeChild(element);
}
this.treevalidate.checkAll();
this.treevalidate.uncheckAll(['11']);
} |
Query-2: Checking the last child node 'N2 Child 4' should uncheck all other parent child nodes .
You can achieve this in the nodeChecking event of treeview.
We have prepared the sample by considering the 'N2 Child 4' node. Please check the sample and let us know whether it fulfills your requirement.
Please let us know if you require any further assistance.
Thanks,
Christo