Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Deleting child nodes in a treeview
Message
From
02/05/2001 13:54:22
Héctor Lizarraga
Gobierno Del Edo de Querétaro
Querétaro, Mexico
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Title:
Deleting child nodes in a treeview
Miscellaneous
Thread ID:
00502654
Message ID:
00502654
Views:
58
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
Map
View

Click here to load this message in the networking platform