Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Computed Grid Column
Message
De
08/05/2000 03:35:56
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
06/05/2000 13:27:25
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00366983
Message ID:
00367156
Vues:
17
>Hi!
>
>Is it possible to create a computed column in a grid and still be able to edit it?
>
>I have a column in a grid with it's controlsource set to the lookup() function which returns the description (of its foreign key column)
>
>Grd1.Col1.ControlSource = LookUp(alias2.fld2,alias1.fld1,alias2.fld1)
>Grd1.Col1.Bound = .T.
>
>It displays the values OKay but text1 (currentcontrol of the column) is readonly and I cannot type in anything in text1 of that column. Text1 does not even get focus.
>
>Thanks
>
>Sarosh


Sarosh,
Calculated columns are always readonly. In your case in a way fld1 mimic a relation and you get fld2 to display. If instead you set a relation between 2 tables and use directly alias2.fld2 as controlsource then you could edit it. But beware in this case when you edit one, you're actually editing it for all fld1 matches.

fld1 fld2
---- ----
0001 item1
0002 item2
0001 item1

When you change item1 to myitem in any row, all item1 become myitem (just you go and edit directly table2).
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform