Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Supermover and PKs
Message
 
 
À
21/03/2003 16:33:41
Peter Easson
Catalina Trading
Sydney, Australie
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00768363
Message ID:
00769229
Vues:
19
Ok, I've read this a few times and I'm afraid I can't understand what this has to do with my question. What it looks like you're describing is a rather convoluted way to deal with PKs in comboboxes. Since comboboxes already can handle two columns without all that extra work, I don't understand why you would do that, but to each his own. :) At any rate, I don't see the connection between this and pulling all the PKs out of a supermover...

I can't afford to spend anymore time with this, so I'm just going to go with padding the string as was initially suggested.

Thanks,

Michelle



>OK,
>With my subclass of Combo, I added an array called aPicklist in the class designer so that it was always available for all child classes. I also added a property called PKValue. The code for the InteractiveChange event in the 1st Child was
>
>if This.ListIndex > 0
>   This.PKValue = This.PickList[This.ListIndex,1]
>endif
>
>For any subclass from now on, during its Init, create another array (from for example) a Select statement like
>
SELECT PKCUST,cName,cSurname from CUST where cSurname = "COX" into array aArray
>and the rest would be
>
 ACOPY(aArray,This.aPickList)
>for m.i = 1 to alen(aArray,1)
>   This.AddItem(This.aPickList[m.i,2] + This.aPickList[m.i,3],m.i,1)
>endfor
>&& if you want to make the first item the default
>This.Selected(1) = .t.
>THis.PKValue = This.aPicklist[This.ListIndex,1]
>DoDefault()
>
>Now, everytime the user changes the seletion in the Combo, the real PK value is always available with This.PKValue
>
>Hope this helps
>
>Pete
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform