Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Control source in a grid
Message
De
05/07/2000 23:35:21
 
 
À
25/06/2000 23:33:04
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00384510
Message ID:
00388682
Vues:
17
>I have 3 differnt letters in one of my fields "D","R",or nothing I want to display 3 differnt words in my grid for each record in that field like if there is a "D" in there it says defaulted or "R" then Redeem would show. Then for the blank one I want to show the word ACTIVE in the cell of my grid. I was able to use the IIF() statement to check for 1 letter but if i have 2 or 3 differnt checks to do iff() only works to check for 1 state. I Tried to put a case statement in the control source for my coloumn but it wont take it. I'm just learning how to program in VFP this stuff probably sounds basic to most of you guys.
> Thanks Kelly

You can use a combobox with an array as the rowsource. The array with have 2 demensions. The first is the display text, the second is the control source. change the property boundcolumn=2 and that will do the trick....
Ex: In the forms init
WITH THISFORM
.AddProperty("alist[1,1]","")
DECLARE .alist[3,2]
.alist[1,1] = "Defaulted"
.alist[1,2] = "D"
.alist[2,1] = "Redeem"
.alist[2,2] = "R"
.alist[3,1] = "N/A"
.alist[3,2] = " "
.Pgf???.Grd???.Col.cboType.RowSourceType = 5
.Pgf???.Grd???.Col.cboType.RowSource = "THISFORM.alist"
.Pgf???.Grd???.Col.cboType.BoundColumn = 2
.Pgf???.Grd???.Col.cboType.Requery()
ENDWITH
Hope this helps....
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform