|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
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 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 Show quoteHide quote "Luqman" <pearls***@cyber.net.pk> wrote in message news:OM2b7MSAHHA.4472@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 > > 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 Show quoteHide quote "Smokey Grindel" <nospam@nospam.net> wrote in message news:%23W4C0CUAHHA.144@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" <pearls***@cyber.net.pk> wrote in message > news:OM2b7MSAHHA.4472@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 >> >> > >
This mail sending code snippet does not work
Scope misunderstanding Examples of VB.net commercial software packages Visual Basic 2003 won't run - get error message Dynamically changing button label from a variable regex.replace and trim Application.EnableVisualStyles() still required in version 2.0 Initialize DefaultPropertyAttribute for a Object property coment a block of code Do I need to reset the cursor or will that happen automatically when I leave the subroutine? |
|||||||||||||||||||||||