Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why the combo box doesn't show my display value?
Message
De
13/12/2005 13:05:14
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01077565
Message ID:
01077570
Vues:
32
>Hi everybody,
>
>I can not understand what I'm doing wrong and why my combobox doesn't want to behave.
>
>I have a form with a pageframe. On the first page I have a combobox to select a carrier for editting and also a new button. When I press New button, added carrier information, I obviously need to add this newly added carrier to my combo and I want to position my combo on this new value.
>
>Here is the code in GetAllCarriers method which is executed in the postsavehook of the form (e.g. when the record was already saved in the table):
>
>
>with this
>	if .lGetAllCarriers
>		.cboCarriers.rowsource = ''
>		thisform.Carriers_biz1.lRequeryAllCarriers = .t.
>
>		.lGetAllCarriers = .f.
>		
>		.cboCarriers.rowsourcetype = 2
>		.cboCarriers.rowsource = 'crsCarriers_All'
>		.cboCarriers.Requery()
>		
>		if not xEmpty(thisform.cSelected_Carriers_pk)
>			.cboCarriers.value = thisform.cSelected_Carriers_pk			
>		endif
>	endif
>
>endwith
>
>The thisform.Carriers_biz1.lRequeryAllCarriers = .t. triggers the assign method of this biz object, which requeries the corresponding cursor addapter. After it's done I have the newly added record in the list, but it's not selected and the display value is still empty.
>
>Do you know what could be wrong here?
>
>Thanks a lot in advance.

.cbocarries.listindex=number of position of new carrier

obviously, you will have to calculate the list position if new carrier is not added to the bottom.
* Human is a question asked by birth and answered by death. Machine is another kind of question with another kind of answer
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform