Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calculated fields in a grid
Message
From
13/03/1998 08:48:55
 
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00084340
Message ID:
00084410
Views:
30
>>In FPW/FPD, I could create calculated fields in a BROWSE by doing;
>>maddress = address1+city+st :H = "Address"
>>
>>In the VFP 5 sample solutions app there is a grid with a calculated field, but the data is bound to the grid in the form (see vfp\samples\solution\controls\grid\calc.scx)
>>
>>I want to do something similar, such as turn a character field from values of "1","2" to "J","S" at runtime, not binding the recordsource before runtime.
>>
>>It doesn't seem to work as you would expect.
>>
>>Any help would be greatly appreciated.
>
>Michael, you can set column.ControlSource to (None) at design time,
>and at the runtime reset it for example to column.ControlSource = IIF(myfield = "1","J","S") if it is what you mean.
>
>HTH, Nick

Michael, you can even use Column.ControlSource="thisform.setcolumn()", where Setcolumn is form's custom method (like UDF).
Edward Pikman
Independent Consultant
Previous
Reply
Map
View

Click here to load this message in the networking platform