Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Displaying currency fields in grids
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Displaying currency fields in grids
Divers
Thread ID:
00154963
Message ID:
00154963
Vues:
52
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.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform