Search code examples
delphiformatcurrencylazarusdbgrid

Setting a DBGrid column format in Delphi


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?


Solution

    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.