Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using Treeview
Message
De
06/11/2001 04:34:49
Ashish Patel
Hindustan Petroleum
Mumbai, Inde
 
 
À
06/11/2001 03:58:29
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Titre:
Divers
Thread ID:
00577815
Message ID:
00577827
Vues:
20
Hi


Tree A and Tree B have same nodes with same key.
Only subnodes for that nodes are diffrent in both the trees.
In the begining only tree A will have subnodes for nodes.
Tree B won't have any subnodes.

User will select subnodes from nodes of tree A, he will also
select node of tree B and then click a button which will add
subnodes to tree B (for selected node of tree B of course)


Name of Tree A is oletree and for B it is oletargettree

if isnull(thisform.oletargettree.selecteditem)
wait wind "Select Node in Target Tree"
retu
endif
t = thisform.oletargettree.selectedItem.text
* targetkey1 is the node selected in the target tree
targetkey1 = thisform.oletargettree.selecteditem.key
sele nodebuild && Temp file which will get populated when
* subnodes are selected in tree A
set filt to nodecheck and whichtree = 1
go top
do while not eof()
thiskey = allt(nodekey) && nodekey is field in the dbf
thistext = allt(nodetext) && nodetext is field in the dbf
thisform.oletargettree.nodes.add(targetkey1,4,thiskey,thistext,,)
thisform.oletree.Nodes.Remove(thiskey)
sele nodebuild
skip
enddo


sele nodebuild
set filt to
go top
zap

thistext = thisform.oletree.selecteditem.text
thisform.oletargettree.nodes.add(targetkey1,4,thiskey,thistext,,)
thisform.oletree.Nodes.Remove(thiskey)
endif


thisform.oletargettree.selecteditem.sorted = .t.

thisform.oletree.refresh
thisform.oletargettree.refresh



Pl. help to solve this problem.

I am getting problem to close the form only if I click the Save button and the node of the target tree has two subnodes.

Thanks in Advance

Ashish Patel
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform