Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1108
  • Last Modified:

European currency notation input problem with DBGrid.

I use Delphi 1.0 for database apps.
Our country uses the european
currency notation so the number like
US$ 1,000.00 will show as US$ 1.000,00.
In TFloatField, the display format
",0.00" is used and it displayed without
problem in our Portuguese Windows 98.

When using the DBGrid, I could not input
the "," as point decimal. I tried to use
the MaskEdit property but it did not work
too. Besides that the delphi will let the
user to type various "," s so the delphi
will generate an exception in case the
user typed the comma 2 times like "45,,50"
instead of "45,50". I don't have problem
with DBEdit, because I download a freeware
DBEdit component to solve this problem.

Please help.
0
davichoi
Asked:
davichoi
1 Solution
 
ThaddyCommented:
If you look under 'CurrencyFormat' variable in he helpfile you'll see that you can change the behaveour by changing two Delphi global variables:

Set:
DecimalSeparator:=',';
ThousandSeparator:='.';

That's all, Your maskedits will now work for european formats.

0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now