473,386 Members | 1,706 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Find the parent node

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?

example.

Parent1, Level0
Child1, Level1
Child2, Level1
Child3, Level2
Child4, Level3

This would look like

Parent1
-Child1
-Child2
-Child3
-Child4

If I insert Parent1 into the tree, how can I get a handle back to parent1
when
I get ready to insert Child1 into the tree and vice versa for all the other
nodes.

Appreciate the help.
Rob
Jan 7 '08 #1
2 2088
On Mon, 07 Jan 2008 07:49:40 -0800, Rob Stevens <ro**********@sundry.com>
wrote:
When restoring nodes to a tree, how can you tell what is
the parent of that node?
The last time you asked this question, I posted a detailed answer along
with a link to another post I'd written as a response to a very similar
question asked by someone else.

You replied that the information appeared helpful and that you would try
using it.

The TreeView and TreeNode classes haven't changed since I made that post,
so there's not really anything new anyone can offer. What about the
previous information provided to you have you been having trouble with?

Pete

p.s. The thread's name was "Unique identifier in every treenode". For
some reason, while it's still in my local newsgroup message cache, I
cannot find that thread in Google Groups. I don't suppose anyone has any
idea why that is, do that? It seems to be in all sorts of other archives
of this newsgroup (do a regular web search on Google and you'll find it).
But not in the Google Groups archive. Very odd.
Jan 7 '08 #2
Not a problem, let me look at it again.

Thanks

p.s. The thread's name was "Unique identifier in every treenode". For
some reason, while it's still in my local newsgroup message cache, I
cannot find that thread in Google Groups. I don't suppose anyone has any
idea why that is, do that? It seems to be in all sorts of other archives
of this newsgroup (do a regular web search on Google and you'll find it).
But not in the Google Groups archive. Very odd.

Jan 7 '08 #3

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

Similar topics

3
by: Eshrath | last post by:
Hi, I have an xsl where a particular child node (<sub1> and <sub2> )can occur in two type of parent nodes (<A> and <B>). like <A> <sub1>11</sub1> <sub2>22</sub2>
12
by: pillepop2003 | last post by:
Hey! Can anyone give me a hint, how this problem is best implemented: I have a table of users (see below), where every user has one "superior user" (= parent node), this should be a fully...
9
by: Bernd.Moos | last post by:
Given the following XML document: <text> <p> <w>Ronaldo</w> <w>scoredw> <w>the</w> <w>1</w> <c>:</c> <w>1</w>
2
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
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...
5
by: Jeroen Ceuppens | last post by:
I need to put a new node at the end of the tree, that end is not te lowest in de list but the deepest (the one with the most + before it) Node A Node 1 Node 2 Node 3 Node 4: Deepest Node B:...
6
by: SQACSharp | last post by:
I'm using the EnumChildWindows API with an EnumChildWndProc callback to populate the treeview. The output will be something similar to spy+ + How can I specify the parent when adding a new node...
0
by: Guzeppi | last post by:
Hi, i'm using linq to load an xml structure into my classes. the xml consists of the same node nested for multiple levels e.g. <node id="node_id01" name="node 01"> <node id="node_id0101"...
1
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
by: SWETA123 | last post by:
I will very helpful to you if you can help me out in my below problem. I am not getting idea what should be the right approach for this. Here is my problem. I have below (sample)xml. <Rules>...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.