S
SeVeN
Hello All,
I am having a problem loading nodes and child nodes into a treeview
from an access database.
My Db fields are as follows :
ID
NodeName
ParentID
Everything works well when the child nodes are created after the parent
nodes. Ex :
ID NodeName ParentID
1 Node1 -1
2 Node2 1
3 Node3 2
My treeview enables the Drag and drop feature so when I move some nodes
around the ParentID changes. If the Parent ID is pointing to a node
that is not added yet to the treeview it will mess up.
Ex:
ID NodeName ParentID
1 Node1 -1
2 Node2 3
3 Node3 1
I can't seem to figure out the best way to code this to be able to get
the childs in they're parent nodes no matter what order they are listed
in the database.
Can anyone help? Thanks!!
I am having a problem loading nodes and child nodes into a treeview
from an access database.
My Db fields are as follows :
ID
NodeName
ParentID
Everything works well when the child nodes are created after the parent
nodes. Ex :
ID NodeName ParentID
1 Node1 -1
2 Node2 1
3 Node3 2
My treeview enables the Drag and drop feature so when I move some nodes
around the ParentID changes. If the Parent ID is pointing to a node
that is not added yet to the treeview it will mess up.
Ex:
ID NodeName ParentID
1 Node1 -1
2 Node2 3
3 Node3 1
I can't seem to figure out the best way to code this to be able to get
the childs in they're parent nodes no matter what order they are listed
in the database.
Can anyone help? Thanks!!