Re: TreeView with Recursive TreeNode....

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Mark Broadbent (nospam_at_nospam.com)
Date: 11/14/04


Date: Sun, 14 Nov 2004 19:55:41 -0000

please read the word "directory" as "node" in my previous post. I copied and
pasted from one of my previous posts and forgot to amend the text.

-- 
Best Regards,
Mark
Mark Broadbent
mcad,mcdba,mcse+i
emailto: newsgroupsATmettayyaDOTgotadslDOTcoDOTuk
remove AT with '@' and DOT with '.' -please do not send spam or address will 
be changed!
"Mark Broadbent" <nospam@nospam.com> wrote in message 
news:OV$9kSnyEHA.3024@TK2MSFTNGP14.phx.gbl...
> Whether this data is read in as XML or not, the tree would still (IMO) 
> have to be built up using traditional programming methods (message calls 
> to the TreeView object) -so Im not too sure where Iain is coming from 
> (although there would be occasions that reading data from the database as 
> XML would be benefical).
> He might be suggesting in this instance that if you have a hierachical 
> view of the data to recurse through then it would simplify the technique 
> for mirroring this in a TreeView and this is probably correct.
>
> Anyhow whatever technique you use for reading in the data the following 
> are the TreeView methods you will use to build up the data tree:-
>
>
> treeViewName.Nodes.Add(node)    //to add a directory if tree is 
> empty -will only happen once
> node.Nodes.Add(node)    //to add a directory if parent has been found in 
> tree and navigated to
> node.Parent    //to assign a reference to a parent node of a node (for use 
> in navigating up the tree) -note that the reference may be null if a 
> parent doesnot exist
> node.Nodes[x]    //to assign a reference to a child node within the node's 
> node collection -to find is node for directory has already been added
> node.Nodes.Count    //for use with above
>
> etc.etc.
>
> It really is quite simple and you will probably be able to write some very
> efficient code.
> -- 
> Best Regards,
>
> Mark
>
> Mark Broadbent
>
> mcad,mcdba,mcse+i
> emailto: newsgroupsATmettayyaDOTgotadslDOTcoDOTuk
> remove AT with '@' and DOT with '.' -please do not send spam or address 
> will be changed!
> "Alex" <chipheo2k@mail.ru> wrote in message 
> news:uztVm%23gyEHA.3120@TK2MSFTNGP12.phx.gbl...
>> Hello!
>> Thanks so much! but do u have another method like traditional 
>> programming? I
>> know nothing about XML ...:))
>>
>>
>>
>>
>> "Iain Mcleod" <mcleodia@dcs.gla.ac.uk> сообщил/сообщила в новостях
>> следующее: news:uXkGHceyEHA.2568@TK2MSFTNGP11.phx.gbl...
>>> Get it as xml.
>>> Got SQL Server 2000?  Use SQLXML.
>>>
>> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnanchor/ht
>> ml/anch_SQLXML.asp
>>>
>>>
>>> Iain
>>>
>>>
>>> "Alex" <chipheo2k@mail.ru> wrote in message
>>> news:O1zmv5cyEHA.3976@TK2MSFTNGP09.phx.gbl...
>>> > Hello!
>>> > I must build a TreeView with recusive treenodes, my database as below:
>>> >
>>> > id        name        parentID
>>> > 1        name1        0
>>> > 2        name2        0
>>> > 3        name3        0
>>> > 4        name4        1
>>> > 5        name5        1
>>> > 6        name6        4
>>> > 7        name7        6
>>> >
>>> >
>>> > so my treeview looks like this:
>>> >
>>> > something
>>> >    name1
>>> >            name4
>>> >                    name6
>>> >                              name7
>>> >            name5
>>> >   name2
>>> >  name3
>>> >
>>> >
>>> > The Recursion is not known (depends on Database).
>>> > Pls help me to build it!
>>> > Thanks in advance!
>>> >
>>> >
>>>
>>>
>>
>>
>
> 


Relevant Pages

  • Re: TreeView with Recursive TreeNode....
    ... > head that he was trying to output a tree in html, ... The xml would possibly give you an advantage in already ... > "Mark Broadbent" wrote in message ... >> for mirroring this in a TreeView and this is probably correct. ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: TreeView Dynamic XML Binding
    ... By monitoring the treeview child nodes when I explicitly set the XmlDataSource.DataFile, I determined that the process is actually using the PopulateOnDemand processing. ... I'm going to put the xml document into a session variable. ... It seems as if the default settings are doing the populate on expand ... otherwise the entire tree reset. ...
    (microsoft.public.dotnet.framework.aspnet.webcontrols)
  • Re: MFC Newbie design question
    ... you could simply copy the XML Node COM pointer ... At the end of the day the tree node ... > The loaded document will be displayed in a TreeView. ...
    (microsoft.public.vc.mfc)
  • Re: TreeView with Recursive TreeNode....
    ... Whether this data is read in as XML or not, the tree would still have ... to be built up using traditional programming methods (message calls to the ... TreeView object) -so Im not too sure where Iain is coming from (although ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: TreeView Dynamic XML Binding
    ... As for the TreeView page, would you provide some further information, such ... you can try put the Xml file path setting code into the ... You can do this by setting the SelectAction to Expand when you databind ... When I click on the tree node for the select ...
    (microsoft.public.dotnet.framework.aspnet.webcontrols)