Guys, need some help with the following problem
the following code deletes all the records of the selected node + the childnodes. But I need to start with the last childnode instead of the first (otherwise it will give an error when a node has 3 or more childnodes).
How can I start the loop with the last childnode?
For Each node As TreeNode In trvCat.CheckedNodes
For Each node2 As TreeNode In node.ChildNodes
deleteKnw(node2.ToolTip)
tblCat.catId = node2.ToolTip
tblCat.delete()
Next
deleteKnw(node.ToolTip)
tblCat.catId = node.ToolTip
tblCat.delete()
Next
Thanks in advance
Morph 'n Nike
the following code deletes all the records of the selected node + the childnodes. But I need to start with the last childnode instead of the first (otherwise it will give an error when a node has 3 or more childnodes).
How can I start the loop with the last childnode?
For Each node As TreeNode In trvCat.CheckedNodes
For Each node2 As TreeNode In node.ChildNodes
deleteKnw(node2.ToolTip)
tblCat.catId = node2.ToolTip
tblCat.delete()
Next
deleteKnw(node.ToolTip)
tblCat.catId = node.ToolTip
tblCat.delete()
Next
Thanks in advance
Morph 'n Nike