I want to disable the parent tree nodes

H

HIFIZombie

or be able to tell if the selected treenode is a parent node. I have
looked at .gettype but how do i check it against something like
treeview1.gettype = treeview.nodes.parentnode

I use my treeview to select a childnode and then populate a textbox
with a value for the node. but when the Parent node is selected I
don't want o be able to change the value of it.

Thanks.
 
L

Luc E. Mistiaen

I guess you really want to know if it is the 'root' node. You can check the
Parent property for null like

if (MyNode.Parent==null)

/LM
 

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

Top