Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dynamic column display value
Message
From
07/11/2003 09:13:14
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
07/11/2003 08:56:46
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00847599
Message ID:
00847609
Views:
18
This message has been marked as the solution to the initial question of the thread.
How about:
Column.ControlSource = ThisForm.MySpecialFormat(IntegerField)

* Method Form.MySpecialFormat():
local lcReturnValue
do case
case IntegerField = 1
  lcReturnValue = "Msg 1"
...
return padr(lcReturnValue, 10)
Another option is nested iif's, but this is hard to read.

>Hi All.
>
>I have a grid with a few columns. One of the columns references an integer field. This field can have one of 5 basic values. Is there a way to dynamically convert the integer value to a text description in the column? i.e. Instead of displaying the field value of 1 the column would display "Msg 1", instead of field value 2 the column would display "Msg 2", and so forth. Any easy solution?
>
>VFP8
>
>Thanks
>
>PS. I did try using a combo box in the column but this seemed to have a detrimental effect on the grid refresh speed?
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform