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?