Setting a DBGrid column format in Delphi

Blue picture Blue · Oct 16, 2008 · Viewed 14.1k times · Source

I am using a DBGrid component in Delphi. I wonder how I can set the format of a column. I have real values that I want to be displayed as currency in the grid.

Someone knows how?

Answer

Germán Estévez -Neftalí- picture Germán Estévez -Neftalí- · Oct 16, 2008
  1. You can set the DisplayFormat of the Field
  2. You can handle OnGetText event. This approach allows to do more complex operations with the value.