473,698 Members | 2,432 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

HLP: Treeview and Recurse (Parent/Child)

I've been beating my brains out on trying to figure out how to do Recurse
(Parent/Child) code for my application (VB.net).

Basically a User enters data into an array. The data is pretty simple:

Parent Child Data
10 15 123
10 16 456
20 25 789
20 28 246
30 35 890
40 55 222

etc.

The info is flexible in that the information varies (depending upon the user
needs). And the quantity of Parent/Child input varies as well (say a maximum
of 50 +/- lines).

Back in VB6, this was a relative easy thing to do. But VB.net just messes me
up.

What the heck is the 'smart' trick here? I've almost got it once... but the
Code (to me) seems veryyyyy messy. There must be a simple 'catch' to this?

Anyone?

TIA

Bruce F
Jul 21 '05 #1
1 1473
Looks like a double-linked list to me. Try googling on that. Here's some
sample code, in VB.NET and/or C#.NET (which should convert to VB.NET fairly
easily):

B-Tree Sample: http://www.codeproject.com/vb/net/SimpleBTree.asp
Single Linked List:
http://www.codeproject.com/csharp/Ph...inkedLists.asp
Double Linked List: http://www.codeproject.com/csharp/doubly-linkedlist.asp
Persistent Data Structures:
http://www.codeproject.com/csharp/Pe...Structures.asp
"Skip List": http://www.codeproject.com/csharp/SkipList1.asp
"Mr. B" <Us**@NoWhere.c om> wrote in message
news:p5******** *************** *********@4ax.c om...
I've been beating my brains out on trying to figure out how to do Recurse
(Parent/Child) code for my application (VB.net).

Basically a User enters data into an array. The data is pretty simple:

Parent Child Data
10 15 123
10 16 456
20 25 789
20 28 246
30 35 890
40 55 222

etc.

The info is flexible in that the information varies (depending upon the
user
needs). And the quantity of Parent/Child input varies as well (say a
maximum
of 50 +/- lines).

Back in VB6, this was a relative easy thing to do. But VB.net just messes
me
up.

What the heck is the 'smart' trick here? I've almost got it once... but
the
Code (to me) seems veryyyyy messy. There must be a simple 'catch' to
this?

Anyone?

TIA

Bruce F

Jul 21 '05 #2

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

Similar topics

4
7594
by: Ian Powell | last post by:
Hi I've got objects in an sorted ArrayList like: P:\ P:\\DOCS P:\\i386 P:\\i386\ASMS P:\\i386\ASMS\1000 P:\\i386\ASMS\1000\MSFT
5
5706
by: JamesT | last post by:
Is it me or has the VB.NET Treeview control gone back to the darkages. I am trying to update a VB6 programme that uses the treeview control a lot- there are 4 treeview controls which are constantly being altered by user input. On upgrading the treeview errors are too numerous to list all of them. What has happened to 'Treeview1.nodes.add (ParentNode, Relation, NodeKey, Text)'? and Treeview1.nodes(NodeKey) Why is there no Node.Key? ...
12
587
by: Bob Hollness | last post by:
Hi. I have a text file containing a list of files and their path. I.e. c:\MyDocs\File1.txt c:\MyDocs\File2.txt c:\MyDocs\File3.txt c:\MyDocs\File4.txt C:\MyDocs\Folder\File1.txt
1
1360
by: Mr. B | last post by:
I've been beating my brains out on trying to figure out how to do Recurse (Parent/Child) code for my application (VB.net). Basically a User enters data into an array. The data is pretty simple: Parent Child Data 10 15 123 10 16 456 20 25 789 20 28 246
4
2306
by: Henry | last post by:
Does anybody have a real-world sample of buiding a treeview control using data from database tables? All the sample code I have found either builds the treeview manually or uses a file directory as the sample. I have trouble translating those samples to working with data coming from my database, so I am hoping that someone could show me a sample of code that builds a tree from say a dataset. Many controls you can bind to a datasource,...
0
1976
by: stevobenno | last post by:
I have spent two days unsuccessfully trying to add cascading checkbox functionality to the IE Treeview in 1.1. Has anyone managed to do this.? I did manage to get some javascript that by all accounts works nicely in 2.0 but just can't seem to work out how to modify it. I can get it so that when I call this function from the checkbox click event EVERY checkbox in the control gets checked and vice versa. Help!
6
11963
by: xla76 | last post by:
I have a simple treeview (treeview1) to which I have added two nodes (nodeA and nodeB) which have n levels of child nodes. What I want is to be able to identify whether the child node I select is under NodeA or NodeB. I can do this by splitting the selectednode.fullpath of the child node but there must be a better way. Can any kind soul can enlighten me?
7
7847
by: Joe Cool | last post by:
Let's say I have a Treeview control on a form. Each leaf node in the Treeview has a ContextMenuStrip, each with one ToolStripMenuItem, and all ToolStripMenuItems Click event is handled by a comment event handler. How do I determine which Treeview Node signalled the menu event in the common event handler?
2
3242
by: =?Utf-8?B?bWFib25k?= | last post by:
I'm using a treeview control. One parent node, several child nodes, several grandchild nodes. Each of the nodes has a checkbox. My question, when the user changes the check value of one of the grandchild nodes to true how do I automatically change that node's parent to check-true and so on up the tree.....and in reverse if the parent is changed to check-false how do I cascade that down to each of the child nodes and their child nodes.
0
8609
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8899
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8871
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6525
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5861
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4371
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4621
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3052
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 we have to send another system
2
2333
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.