I want to disable the parent tree nodes

  • Thread starter Thread starter HIFIZombie
  • Start date Start date
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.
 
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
 
Back
Top