We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Regarding TreeView Node Delete

Hi
I write code for Button Click event remove Selected Treeview node. But it was not working.

Code:
tvQuestionnaire.Items.Remove(tvQuestionnaire.SelectedNode)

1. How to remove or delete selected treeview Node?.
2. Is there any way to delete selected node using js?.

Thank you
Dinesh


1 Reply

RP Rekha P Syncfusion Team August 15, 2008 10:12 AM UTC

Hi Dinesh,

Thank you for your interest in Syncfusion Products.

Regarding,
1. How to remove or delete selected treeview Node?.

Please use the below code in the button click event.
protected void Button1_Click(object sender, EventArgs e)
{
if (TreeView1.SelectedNode != null)
TreeView1.SelectedNode.ParentItem.Items.Remove(TreeView1.SelectedNode);
}

2. Is there any way to delete selected node using js?.

I regret to let you know that currently we do not provide support for deleting the selected node through client side in our code library. We have notified our development team on this regard and will get back to you once we hear back from them.

Please let me know if you have any concerns.

Thanks,
Rekha


Loader.
Live Chat Icon For mobile
Up arrow icon