Solved

query and dbgrid.

Posted on 2002-04-22
6
329 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 100 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
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
This video discusses moving either the default database or any database to a new volume.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

744 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

13 Experts available now in Live!

Get 1:1 Help Now