query and dbgrid.

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.
kokenAsked:
Who is Participating?
 
kretzschmarConnect With a Mentor Commented:
oops sorry, the format should be
#,##0
0
 
kretzschmarCommented:
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
 
AloneCommented:
... or try to set this TField property at design-time via Object Inspector... ;-)

WBR...
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
kretzschmarCommented:
>or try to set this TField property at design-time via Object Inspector..
yes, of course, if possible
0
 
kretzschmarCommented:
any problems, koken?
0
 
kokenAuthor Commented:
thanks. kretzschmar.

good works.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.