Category: Widget
Updated

This solution is summarized from an archived support forum post. This information may have changed. If you notice an error, please let us know in Discord.

Format Table Column for Currency Using Two (2) Decimals

Issue

I have a table in my mysql database with decimal fields set as (19,2). When I run a query, it returns numbers formatted as expected with 0.00, but in asppsmith, it returns numbers without respecting the format. How can I format the table column to always show 2 decimal places?

Resolution

The solution to formatting a table column to always show 2 decimal places is to set the Computed value using the toFixed(2) method in the column settings.