Solved

European currency notation input problem with DBGrid.

Posted on 1998-12-03
1
1,098 Views
Last Modified: 2012-08-13
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
Comment
Question by:davichoi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 2

Accepted Solution

by:
Thaddy earned 50 total points
ID: 1349169
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: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses
Course of the Month4 days, 17 hours left to enroll

635 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question