Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Displaying currency fields in grids
Message
From
05/11/1998 14:42:19
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Displaying currency fields in grids
Miscellaneous
Thread ID:
00154963
Message ID:
00154963
Views:
50
On the assumption that maybe there's somebody else out there who doesn't know this yet, I thought I'd share what I found out while trying to control the number of decimals displayed for a currency field in a text box in a grid. Fields of data type "currency", of course, have four positions to the right of the decimal. For display purposes I wanted to show only two digits to the right of the decimal. In a stand alone text box (not in a grid) you can accomplish this by settig the format to "R" and the input mask to "99,999,999.99". In a grid, if you set these properties at the field level (i.e., set properties of the text box within a column), you still see four decimals to the right when the text box does not have the focus. If you then set Sparse to .F. for that column, you'll see only two decimals even when the text box does not have the focus. Also, it turns out that you can set the format and input mask properties AT THE COLUMN LEVEL and not have to set them at the field level at all, nor set Sparse to .F. I hope this information saves somebody else some minor headaches down the road. BTW this is in VFP 5.0a.
Rick Borup, MCSD

recursion (rE-kur'-shun) n.
  see recursion.
Next
Reply
Map
View

Click here to load this message in the networking platform