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

x
?
Solved

query and dbgrid.

Posted on 2002-04-22
6
Medium Priority
?
341 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
  • 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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

Independent Software Vendors: 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!

Question has a verified solution.

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

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
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…
Loops Section Overview
Suggested Courses

926 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