Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid and different data types in same column
Message
From
03/03/2000 10:09:30
 
 
To
03/03/2000 07:51:15
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00340889
Message ID:
00341236
Views:
27
Hi Cetin,

Thanks for the reply. In this case it is a read only column that may or may not have a value. To be sure the user does not misread the data a n/a is clearer than 0 in this case. I can see where a DynamicInputMask might be usefull in some cases. Thanks for the code example



>>Is it possible to do an IIF in a column to display a char value like 'n/a' if the value is 0?
>>
>>I have a column based on a cursor and the data is numeric. If the value is 0 I want to display 'n/a'...
>>
>>
>>Thanks
>
>
John,
>If you do that with a readonly cursor then iif() for a controlsource would work. OTOH if you want to have it for an editable grid then I think you should use DynamicInputMask + another textbox control.
>
>myGrid.myColumn :
>.Controlsource = "myTable.myField"
>.CurrentControl = "Text2"
>.DynamicInputMask = "iif(myTable.myField=0, 'N/A','999,999.99')"
>
>.Text2.InputMask = '999,999.99'
>
>Cetin
Previous
Reply
Map
View

Click here to load this message in the networking platform