Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Tree View Node Selection

1 view
Skip to first unread message

Jerry Langley

unread,
Jan 23, 2006, 4:30:06 PM1/23/06
to
Once a treeview node is selected how can I programmatically unselect it so
that it might be selected again following the first selection if the user
desires?
The after selection event only fires when the selection changes.

Peter Bromberg [C# MVP]

unread,
Jan 23, 2006, 4:56:06 PM1/23/06
to
Can't you just do something like

myTreeView.SelectedNode= myTreeView.Nodes[0]

this would move the selectednode off the one just selected, allowing it to
be reselected?
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com

Stoitcho Goutsev (100)

unread,
Jan 23, 2006, 5:14:13 PM1/23/06
to
One can also simply set

this.treeView1.SelectedNode = null;

This will unselect any selected node.


--

Stoitcho Goutsev (100)

"Peter Bromberg [C# MVP]" <pbro...@yahoo.nospammin.com> wrote in message
news:ED775659-64DD-401B...@microsoft.com...

0 new messages