Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Changing nodes in a treeview..
Message
 
À
21/11/2006 03:55:08
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 6
Divers
Thread ID:
01171348
Message ID:
01171350
Vues:
9
>I have a treeview whose node's text and key is saved in a table. I have a couple of textboxes whose controlsource is table.field. This table have ckey in reference to treeview's key.
>
>If a user changes from node to node, I want to be able to also change the value of my textboxes based from the table's ckey or node.key.
>
>I've placed the two tables in the form's data environment and made a relation between ckey in each table.
>
>But everytime I change from node to node, the value of the textboxes doesn't change.
>
>Am I missing something? What is wrong?

Nothing is wrong. Just TreeView is ActiveX control, not Native VFP one and as such it is not bounded to table. When you move from Node to node you must put a code in NodeClick event of the TreeView and there you must move Record Pointer to appropriate record in your table depending of the key of the node. Then just refresh all native controls that are binded to that table.
*** NodeClick event of the TreeView
LPARAMETERS node

SEEK node.Key IN MyTable
thisform.Text1.Refresh()
** or thisform.Refresh()
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform