FORUMS PROFESSIONNELS
WINDEV
,
WEBDEV
et
WINDEV Mobile
Accueil
|
Messages récents
|
Connexion
|
Déconnexion
|
Français
Accueil
→
WEBDEV 2024
→
Getting the Selected Value from a TreeView Control
Getting the Selected Value from a TreeView Control
Débuté par Carlos Antunez, 23 sep. 2017 16:21 - 1 réponse
Connectez-vous…
Carlos Antunez
#1
Posté le 23 septembre 2017 - 16:21
Hi and thanks for the Help in advance.
I am having an issue with the TreeView Control (Not the TreeView Table).
I am able to to load the data into the TreeView Control from my database table without any issues. I get my Root, my Nodes and my leafs.
What I need to do is simple, however, I can't get it to work,and no one sims to know, or at least no one have been able to help me.
All I need is that when I click on my leaf, an info message that says "You Click on Customer Name: <The Value of the Customer Name> for example if I click on Mr. Donal Greg, and so on.
This is the code I have but it does not work
Info("You Have Clicked On "+TreeIdentifier(TREE_Customers, TreeSelect(TREE_Customers,True)))
Can you help?
Thanks
Best regards
Signaler
0
0
Carlos
#2
Membre enregistré
37 messages
Posté le 30 septembre 2017 - 13:20
Ok. After a long wait and a hard research on my own. I was able to get a help from a friend in Facebook (Moises Velez)
Here is the Code to accomplish what is so simple to do but the PCSoft Help lacks
I hope this will help others
Res
is string
Res
=
TreeTypeItem
(
TREE_Areas
,
TreeSelect
(
TREE_Areas
)
)
SWITCH
Res
CASE
tvError
:
Info
(
"Element not found"
)
CASE
tvLeaf
:
Info
(
"The element is a Leaf: "
+
CR
+
"The Value:"
+
ExtractString
(
TreeSelect
(
TREE_Areas
)
,
1
,
TAB
,
FromEnd
)
)
Info
(
"The Path is: "
+
TreeSelect
(
TREE_Areas
)
)
Info
(
"The Index is:"
+
TreeIdentifier
(
TREE_Areas
,
TreeSelect
(
TREE_Areas
)
)
)
CASE
tvNode
:
Info
(
"The element is a Node"
)
//The Node does Not Count, it does not have a decendant over it's nodes and leafs, when selected the root it will return 0 or Null
Info
(
"The Index is: "
+
TreeIdentifier
(
TREE_Areas
,
TreeSelect
(
TREE_Areas
)
)
)
END
--
Best regards,
Carlos
Signaler
0
0
→ Revenir à WEBDEV 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (précédentes versions)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Type de recherche
Uniquement les sujets
Tous les messages
Période de recherche
Date indifférente
Moins d'une heure
Moins de 24 heures
Moins d'une semaine
Moins d'un mois
Moins d'un an
Annuler
Aperçu de votre message
Ajouter une image
Importer une image depuis une URL
Envoyer une image depuis un fichier de votre disque
Déposez ici un fichier ou cliquez sur "Parcourir..."
ou
Annuler
0%
WLangage
SQL
XML, HTML
JAVA, Javascript
Texte