Board index » delphi » Displaying dBase floats with 2 decimal places in TDBGrid

Displaying dBase floats with 2 decimal places in TDBGrid

Is there an SQL conversion function or a way with the TDBGrid to display
dBase floats with 2 decimal places?

ie. when the float value is 0... the TDBGrid shows 0.... but I need it to
show 0.00

Is there a simple way to do this without writing an OnDraw event?

Simon Fedyk

 

Re:Displaying dBase floats with 2 decimal places in TDBGrid


Every TNumericField have the DisplayFormat property. Just define the 0.00
there for desired fields.

With best regards, Mike Shkolnik
EMail: mshkol...@scalabium.com
http://www.scalabium.com

"Simon Fedyk" <si...@flyingpigsolutions.com> ???Y/???Y ?????
???Y??: news:3d8fe0a3@newsgroups.borland.com...

Quote
> Is there an SQL conversion function or a way with the TDBGrid to display
> dBase floats with 2 decimal places?

> ie. when the float value is 0... the TDBGrid shows 0.... but I need it to
> show 0.00

> Is there a simple way to do this without writing an OnDraw event?

> Simon Fedyk

Re:Displaying dBase floats with 2 decimal places in TDBGrid


Quote
"Mike Shkolnik" <mshkolnik2...@ukr.net> wrote in message

news:3d901a0e@newsgroups.borland.com...
Quote
> Every TNumericField have the DisplayFormat property. Just define the 0.00
> there for desired fields.

> With best regards, Mike Shkolnik
> EMail: mshkol...@scalabium.com
> http://www.scalabium.com

> "Simon Fedyk" <si...@flyingpigsolutions.com> ???Y/???Y ?????
> ???Y??: news:3d8fe0a3@newsgroups.borland.com...
> > Is there an SQL conversion function or a way with the TDBGrid to display
> > dBase floats with 2 decimal places?

> > ie. when the float value is 0... the TDBGrid shows 0.... but I need it
to
> > show 0.00

> > Is there a simple way to do this without writing an OnDraw event?

> > Simon Fedyk

Other Threads