remove selected treenode

J

John Devlon

Hi,

I would like to delete a selected treenode and all treennodes below the
selected one...
I've tried ...

Me.Treeview1.Nodes.Remove(Treeview1.SelectedNode)

but nothing is removed....



Does anyone have an idea ?

Thanx

John
 
A

Andy

If you are referring to the treenode from webcontrols, then you need
to obtain the treenodescollection for the treeview and invoke its
remove method on the indexed child node:

Treeview1.Childnodes(index).remove
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top