473,508 Members | 2,327 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

I want to disable the parent tree nodes

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.

Aug 24 '07 #1
1 1769
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

"HIFIZombie" <Ph**************@gmail.comwrote in message
news:11**********************@m37g2000prh.googlegr oups.com...
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.

Aug 25 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
5287
by: dannielum | last post by:
Hi all, I am trying to write a Binary Search Tree that each of its node will have 3 node pointers: left, right and parent. I need a parent pointer for some the purpose of my project. Without the...
1
1928
by: clintonG | last post by:
How do I get a TreeNode.Parent property when using the 2.0 TreeView control? When the data source is an XML file there may be redundant names in the tree. For example, when a child node with the...
7
3747
by: amruta | last post by:
the code below dows not let me get the parent child view... all the nodes are show in one line only... also i need them to be collasped ... Thanks ..
24
4625
by: Phil Latio | last post by:
Let's say I have a simple web application running with just two MySQL tables. The tables structure is as follows: Table: category category_id (PK) category_name parent_category (FK)...
2
4151
by: Bob | last post by:
Hi, I would to have a tree view control with check boxes in which the parent and child nodes interacts, in the way that you normally see this occuring. Checking the parent node automatically...
4
608
by: sharan | last post by:
Hello Friends I have a problem in Data Structure (In C) i want to implement a General tree having three child nodes of each parent node ...please send me any simple Example( code) by which i can...
2
2094
by: Rob Stevens | last post by:
When restoring nodes to a tree, how can you tell what is the parent of that node? Also how can you get a handle to the parent node, this way you can insert the node into the correct place? ...
1
3771
by: bnchs | last post by:
This is C code. I am trying to fill each node's Parent field with its parent because I am drawing nodes to the screen. However, I have not been able to get this working. Reading the output from the...
1
1435
by: Snehasis | last post by:
Hi All How to disable all the check boxes for each nodes in the tree view in C#? Thanks in advance.. Ashis
0
7224
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7120
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7323
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7039
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5626
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4706
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3192
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1553
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
415
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.