General information
Category:
ActiveX controls in VFP
Title:
Deleting child nodes in a treeview
Hi all, I have a treeview wich I fill with the routine that comes with the treeview samples. When I delete a node there's no problem but when the node have childrens (If oTreeView.SelectedItem.Children > 0), how can i loop throughout the key's child nodes. I have this:
nIndice = oMenu.SelectedItem.FirstSibling.Index
Do While nIndice <> oMenu.SelectedItem.Node.LastSibling.Index
DELETE FROM DRH_Menu WHERE DRH_Menu.Key = oMenu.Nodes(nIndice).Next.Key
nIndice = oMenu.Nodes(nIndice).Next.Index
Enddo
oMenu.Nodes.Remove(oMenu.SelectedItem.Key)
TABLEUPDATE(0, .T., 'DRH_Menu')
The thing is that deleting the node in the treeview is no problem even with children below it, but i need to match the teeview key's node with my nodes table. How can i do this?
Thanks in advance
Hector L.
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only