Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dynamic value of textbox in a grid
Message
De
06/04/1998 12:27:22
 
 
À
06/04/1998 12:22:59
Raul Davila
Davila Programming Services
Toa Alta, Porto Rico
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00089867
Message ID:
00089869
Vues:
26
>Hi:
>
> This should be easy but I have yet to make it work.
> I want to change the value of a textbox inside a grid
> depending on a logical field in a table.
>
>Eg:
>crea table users (user C(10), level L)
>
>The grid has two columns:
> grid.column1.ControlSource = users.user
> with grid.column2
> .ControlSource = users.level
> .Bound = .F. && I don't want a ControlSource on the textbox
> .ReadOnly = .T.
> .Sparse = .F.
> endwith
>
> grid.column2.text1.value = iif(users.level, 'Master User', 'Normal User')
> FAILS -> it only uses the value of users.level on the first record
>
> Any ideas aside from adding a new field to the table?
>
>TIA

You can use Grid.Column2.ControlSoucre="Thisform.setcolumn2()"
*** Form. Setcolumn2 method
return iif(users.level, 'Master User', 'Normal User')
Edward Pikman
Independent Consultant
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform