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 07:51:15
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
02/03/2000 17:34:19
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00340889
Message ID:
00341158
Views:
27
>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
Ç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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform