remove selected treenode

remove selected treenode

am 21.04.2008 14:49:49 von 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

Re: remove selected treenode

am 21.04.2008 19:13:54 von 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

Re: remove selected treenode

am 21.04.2008 20:38:25 von John Devlon

Thanx Andy

John



"Andy" schreef in bericht
news:2178c8ee-cf61-42c8-bdec-de64209727df@p25g2000pri.google groups.com...
> 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