By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,239 Members | 1,505 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,239 IT Pros & Developers. It's quick & easy.

Filling TreeView with Recursive Function ?

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.