Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Creating Treeview with data from a table problem...
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Creating Treeview with data from a table problem...
Divers
Thread ID:
00617862
Message ID:
00617862
Vues:
78
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform