Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting child nodes of a treeview
Message
From
30/11/2006 19:13:03
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Getting child nodes of a treeview
Environment versions
Visual FoxPro:
VFP 6
Miscellaneous
Thread ID:
01173946
Message ID:
01173946
Views:
43
Now that I'm able to get the child nodes of a parent node or selected node, I'd like now to get the child nodes of these child nodes and append it to a table.

My current code is this
nodeptr = thisform.oletreeview.selecteditem

local childnodeptr
childnodeptr = m.nodeptr.child

select ckey from treeview into cursor csrtemp where alltrim(ckey)==nodeptr.key
use (dbf([csrtemp])) again in 0 alias csrtable
select csrtable
use in csrtemp

do while !isnull(m.childnodeptr)
	append blank
	replace ckey with m.childnodeptr.key
	childnodeptr = m.childnodeptr.next
enddo
I want my table to look like this,

Selected node
Child 1 of selected node
Child 1.1
Child 1.2
Child 1.2.1
Child 1.2.2
Child 1.3
Child 2 of selected node
Child 2.1
Child 2.1.1
Child 3 of selected node
Child 3.1
Child 3.2

Any one help me?
Next
Reply
Map
View

Click here to load this message in the networking platform