Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

query and dbgrid.

Posted on 2002-04-22
6
Medium Priority
?
340 Views
Last Modified: 2010-04-04
hello.
i am viewing in dbgrid my query results. but i want to see my integer column in ###.###.### (thousand separetor) format.

i can see with table ->dbgrid.
but i can not see query -> dbgrid.

thanks.
0
Comment
Question by:koken
[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
  • 4
6 Comments
 
LVL 27

Expert Comment

by:kretzschmar
ID: 6959323
you must provide a display-format for the tfield
at runtime (maybe in the afteropen-event of your tquery

just from head now

for i := 0 to query1.fieldcount-1 do
  if query1.fields[i].datatype = ftInteger then
    TIntegerField(query1.fields[i]).displayformat := '#.##0';


meikl ;-)
0
 
LVL 27

Accepted Solution

by:
kretzschmar earned 400 total points
ID: 6959326
oops sorry, the format should be
#,##0
0
 
LVL 1

Expert Comment

by:Alone
ID: 6959372
... or try to set this TField property at design-time via Object Inspector... ;-)

WBR...
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 27

Expert Comment

by:kretzschmar
ID: 6959380
>or try to set this TField property at design-time via Object Inspector..
yes, of course, if possible
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 6962016
any problems, koken?
0
 

Author Comment

by:koken
ID: 6962581
thanks. kretzschmar.

good works.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses

670 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