FORUMS PROFESSIONNELS
WINDEV
,
WEBDEV
et
WINDEV Mobile
Accueil
|
Messages récents
|
Connexion
|
Déconnexion
|
Français
Accueil
→
WINDEV 2024
→
arraydelete
arraydelete
Débuté par Garry Allen, 23 jan. 2018 00:05 - 2 réponses
Connectez-vous…
Garry Allen
#1
Posté le 23 janvier 2018 - 00:05
This must be a dumb question but I can't seem to find anything in the help.
I have a browsed array of structures, say 10 of them and the user has selected the 6th element and wants to delete it by pressing a Delete button. What is the syntax for the button?
ArrayDelete(garrItems,CurrentElement) does not work.
Signaler
0
0
Luis Antonio Gutiérrez Flores
#2
Posté le 23 janvier 2018 - 00:36
I do it the next way, if the user selects it from a combobox I store in the glink of my combobox something useful to retrieve like the ID, so I do the following:
nSubscript is int = ArraySeek(arrMyArray,aslinearfirst,"IDFieldArray",COMBO_ID..StoredValue)
IF nSubscript <> -1 THEN
ArrayDelete(arrMyArray,nSubscript)
END
This code searches de ID stored in my combo in the Structure element where the ID is stored (I wrote it as IDFieldArray) and if it founds the ID selected from the combo in the array it deletes that array element.
Signaler
0
0
Garry Allen
#3
Posté le 24 janvier 2018 - 17:24
Thanks for the suggestion. This was my first attempt at browsing an array and I solved the problem by using a memory table instead.
Signaler
0
0
→ Revenir à WINDEV 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