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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

delete multiple TreeNodes

Thread ID:

Created:

Updated:

Platform:

Replies:

1385 Oct 23,2002 05:51 AM UTC Oct 23,2002 11:49 PM UTC Windows Forms 1
loading
Tags: FAQ
Heike Brackmann
Asked On October 23, 2002 05:51 AM UTC

I just found an example on how to inherit from TreeView to allow selection of multiple nodes. Everything works fine. Now I want to delete the selected nodes. Here's what I tried: for each DummyNode in TreDokumente.SelectedNodes TreDokumente.Nodes.Remove (DummyNode) next but that doesn't work. Any ideas how to do it?

Administrator [Syncfusion]
Replied On October 23, 2002 11:49 PM UTC

> I just found an example on how to inherit from TreeView to allow selection of multiple nodes. Everything works fine. Now I want to delete the selected nodes. Here's what I tried: > > for each DummyNode in TreDokumente.SelectedNodes > TreDokumente.Nodes.Remove (DummyNode) > next > > but that doesn't work. Any ideas how to do it? Hi, The Nodes collection is not a single level one. Each node can then have its own collection like a true true. So, it must be that your selected nodes are not in the Nodes collection that you are trying to delete them from. You should do something like this. node.Parent.Nodes.Remove(node); Hope this helps. Daniel Syncfusion

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;