Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combobox
Message
 
À
12/10/2004 10:44:52
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Divers
Thread ID:
00950672
Message ID:
00950730
Vues:
16
>I have a form with a combobox. Combobox contains 2 colums, first name and last name. I show first name+"-"+last name in displayvalue propery and everything looks good except one thing. When I click on drop-down arrow 1st record in drop-down list is selected instead of record that is displaying.
>Also thisform.combo1.rowsource = table1.first_name,last_name'.


I normally do not use the table as Rowsource but a local array instead, then in the requery I do something like this
local lcWasCS

lcWasCS = this.ControlSource
this.ControlSource = ""

select allt(FIRSTNAME) +"-"+ allt(LASTNAME) as NAME, ID;
  from CUSTOMER;
   order by ...
    into array this.a_Data             && <- if You choose the array's name to be aData You'll get problems 

this.RowSourceType = 5 && Array
this.RowSource     = "this.a_Data"
this.BoundColumn   = 2
this.BoundTo       = .T.
this.ControlSource = lcWasCS
something like that. Either You create a class for that or add the array in the init via .AddProperty()
Regards from Berlin

Frank

Dietrich Datentechnik (Berlin)
Softwarekombinat Teltow (Teltow)

Frank.Dietrich@dd-tech.de
DFPUG # 327
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform