473,407 Members | 2,312 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,407 software developers and data experts.

Filling TreeView with Recursive Function ?

I am using VB.Net 2005 and I want to fill the Tree View with Oracle
Scott/Tiger Table which contains Parent/Child keys in one table, how can I ?

In VB-6, I used TreeView Key while in VB.Net 2005, there is no Key in
TreeView, how can I fill the control ?

Best Regards,

Luqman
Nov 5 '06 #1
2 8869
use a hash table to make a reference key to the node

like this

Dim MyNodes as new hashtable()
dim node as new treenode
Mytreeview.nodes.add(node)
mynodes.add(Key,node)

then to use the key
directcast(mynodes(key),treenode).nodes.add(nodea)

just a quick psuedo code example, its not necessarly syntatically correct
"Luqman" <pe*******@cyber.net.pkwrote in message
news:OM**************@TK2MSFTNGP03.phx.gbl...
>I am using VB.Net 2005 and I want to fill the Tree View with Oracle
Scott/Tiger Table which contains Parent/Child keys in one table, how can I
?

In VB-6, I used TreeView Key while in VB.Net 2005, there is no Key in
TreeView, how can I fill the control ?

Best Regards,

Luqman


Nov 6 '06 #2
Hi,

Thanks for notifying about Hashtable.

It means, I have to put the data with key/value to hashtable before adding
to treeview nodes.

I tried using Datarow but as the data sorting is not as per sorting,
required by treeview, so I get errors about invalid keys.

Any idea / better solution to this will be appreciated, as I am new to
Hastable ?
Best Regards,

Luqman
"Smokey Grindel" <no****@nospam.netwrote in message
news:%2***************@TK2MSFTNGP02.phx.gbl...
use a hash table to make a reference key to the node

like this

Dim MyNodes as new hashtable()
dim node as new treenode
Mytreeview.nodes.add(node)
mynodes.add(Key,node)

then to use the key
directcast(mynodes(key),treenode).nodes.add(nodea)

just a quick psuedo code example, its not necessarly syntatically correct
"Luqman" <pe*******@cyber.net.pkwrote in message
news:OM**************@TK2MSFTNGP03.phx.gbl...
>>I am using VB.Net 2005 and I want to fill the Tree View with Oracle
Scott/Tiger Table which contains Parent/Child keys in one table, how can I
?

In VB-6, I used TreeView Key while in VB.Net 2005, there is no Key in
TreeView, how can I fill the control ?

Best Regards,

Luqman



Nov 7 '06 #3

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

Similar topics

3
by: feel | last post by:
Goin' crazy with this recursive function ported from delphi... I send a string like DirA/ DirB /DirC but i get in the treeView each one in a new node.Cant get the child node....!! -DirA -DirB...
0
by: Ryan | last post by:
I'm doing a recursive function that receives a TreeNode object. It's traversing an XMLDocument and putting the data in a TreeView. The problem is that to start out, I only have a TreeView object....
12
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
by: Marc R. | last post by:
Hi all, I need help (again). (sorry for my english, it is not my first language) I was successfull by my own to create the treeview nodes from data into a table by using a dataview and...
0
by: Dianna | last post by:
Hi, I am doing a recursive search of my treeview. All I am doing is iterating through the nodes and checking if my tag = my id. It seems to works, finds the ID, selects it and exits. However,...
0
by: Henry | last post by:
I am trying to create a TreeView control that works with an ADO Dataset DataTable or the new BindingSource stuff in .NET 2.0 to build a Treeview that is populated. This is what I came up with...
1
by: David | last post by:
I am running VB.Net 2005. Currently I am experiencing problems saving and loading a Treeview to file. I am using Text, Key and ImageIndex in the treeview nodes. When I save the treeview to...
2
by: Norton Who | last post by:
Hi, Could I please ask if anyone could help me solve this problem in VS2003: I'm trying to count all the nodes that have a Checked state however this doesn't seem to be working for me. So...
12
by: minimalniemand | last post by:
I try to recursivley fill a treeview from a xml-file. It works well, when the contents of the xml and the treeview match 1:1. code here: http://mad-scientists.co.uk/micha/shownode.txt a sample...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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
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
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...
0
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,...

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.