Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ListBox mover button update question
Message
De
22/11/2000 12:45:16
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00444603
Message ID:
00444676
Vues:
8
>sorry to be a bother. I am tryint to "get it". I ended up loading the listbox with just 1 column. I am using the seqeuence number as the ItemID. Will this work?
>
>select otemp
>do while !eof()
> this.list1.addlistitem(otemp.coll_desc,otemp.coll_seq,1)
> skip + 1
>enddo
>
>Now when it is time to save the changes, I have the itemid which is the old sequence number, which will find the row in otemp, and i have listindex which will be the new sequence number. But I want to update by getting the table record first, then finding the listbox itemid. If I know otemp.coll_seq (the old sequence number) how do i find the corresponding itemid in the listbox? I do not know the syntax.
>


Not a bother :)
OK, let me ask you a couple of questions before I answer again, as I think I have confused the issue.

1) Is the ItemID the unique identifier for the row? (primary key, e.g.)
2) If not, what is?


>what does the .NewItemID do in the AddListItem in your example?
>
>Thanks
>
>Brenda
>
>


NewItemID gets the item id of the last item added to the list.
In my example it allows you add 3 columns without needing to know the actual item id.
this.AddItem("Hello") && adds an item
this.AddListItem("World", this.NewItemID, 2) && adds a new 2nd column to the most recently added item
Insanity: Doing the same thing over and over and expecting different results.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform