Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating Treeview with data from a table problem...
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Creating Treeview with data from a table problem...
Miscellaneous
Thread ID:
00617862
Message ID:
00617862
Views:
74
Hi I am trying to create a treeview from data in a table - I used to hard code it in like this...

with thisform
.oleTree.nodes.add(, 1, 'Sys1','System', 'System')
etc etc...

Here is the code I am using to read in from the 'navigator' table...

select navigator
* loop through all the records
for intLoop = 1 to reccount('navigator')
strGroup = alltrim(navigator.na_group)
strName = alltrim(navigator.na_name)
strGraphic = alltrim(navigator.na_graphic)
strIdent = alltrim(navigator.na_ident)
* test each record to see if it's a topnode
if navigator.na_topnode
.oleTree.nodes.add(, 1, strGroup, strName, strGraphic)
else
.oleTree.nodes.add(strGroup, 4, strIdent, strName, strGraphic)
endif
endfor

BUT I get an error - "OLE IDispatch exception code 0 from Nodes: Key is not unique in collection."

I checked the values getting read into the command and it's the same as my code above...

Any ideas?
Chris Maiden
Email
Web
Next
Reply
Map
View

Click here to load this message in the networking platform