Hi Wouter,
Thanks for contacting Syncfusion support.
We have analysed your query. We would like you to inform that, in the showcased sample “remove node” button is used to remove the previously added node in TreeView control.
If you want to remove the selected node, then we need to pass the selected “node” to “removeNode” method. Please refer the below code sample,
[script]
function onRemoveNode() {
if (treeview.model)
treeview.removeNode(treeview.getSelectedNode());
} |
We have live demo sample for your requirement. Please refer the below link:
In this sample, we have removed the selected node of TreeView control while we click on the remove button.
Please let us know whether the provided sample is helpful in achieving your requirement. If not, get back to us with more information.
Regards,
Piramanayagam R