Hi Abhishek,
Thank you for contacting Syncfusion support.
In our TreeView component, you can use removeNodes method to remove single, multiple or all the tree nodes. For removing single/ multiple nodes you can either pass the tree id or tree node element in the removeNodes method. For removing all the nodes, you can pass the treeview component’s root ul element. We have prepared a sample for your reference. In this sample, we have removed a single node and the entire tree nodes on separate button click. Please check below code block and sample,
[cshtml]
var treeObj
= document
.getElementById('tree').ej2_instances
[0];
//removes single tree node of id '6'
treeObj
.removeNodes(['6']);
//removes all tree nodes
treeObj
.removeNodes([treeObj
.element
.querySelector('.e-list-parent')]);
Please let us know if you have any concerns.
Thanks,
Christo