Solved

European currency notation input problem with DBGrid.

Posted on 1998-12-03
1
1,080 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
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video discusses moving either the default database or any database to a new volume.

759 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now