Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding nodes to a treeview from a table?
Message
From
26/11/2006 23:48:20
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Adding nodes to a treeview from a table?
Miscellaneous
Thread ID:
01172547
Message ID:
01172547
Views:
100
Any other way to add nodes to a treeview from a table?

I have this code in my form's activate. But I get error every now and then.

OLE IDispatch exception code 0 from Nodes: Key is not unique in collection.
sele treeview
go top
=tableupdate(.t.)
do while .not. eof()
	if ckey="R"
		lonewnode = thisform.oletreeview.nodes.add(,,alltrim(ckey),alltrim(ctext)) <--- this is where the error comes up
	else
		lonewnode = thisform.oletreeview.nodes.add(alltrim(crelative),crelation,alltrim(ckey),alltrim(ctext))
	endif
	skip
enddo
Next
Reply
Map
View

Click here to load this message in the networking platform