Zero (0) renders as .00

Tags: #<Tag:0x00007efc64450030>

I hope this is an easy one… In my Hot table if I load a zero value into a column from the database it renders as .00. Is there a way to force it to 0?

Thanks,
Martin.

Hi Martin,

do you mean something like this https://jsfiddle.net/hLc6wg5y/
I used a custom renderer to show a fixed string of $0 if a value of the cell is 0.

HI Aleksandra,

Thanks for that. Strangely enough it didn’t solve my problem at first, so I went digging a bit deeper. Turns out the JSON coming from the server was encoding 0 as .00 (no idea why!) so I needed to fix that.

Your help definitely pushed me in the right direction though, so many thanks!

Martin.

I’m more than happy to hear that I was able to help, Martin.

If you’d need anything just let me know.