Skip to main content
Inspiring
February 12, 2014
Question

get cfgrid to stop rounding numbers, need 2 decimal places

  • February 12, 2014
  • 1 reply
  • 744 views

Hi all!

I'm having an issue where cfgridcolumn takes the number 65.20 and displays it as 65.2 because it appears to always round to 1 digit after the decimal.

How  do I get it to display "65.20"? (two digits after the decimal)

Thank you!

B.

This topic has been closed for replies.

1 reply

Fernis
Inspiring
February 13, 2014

Are you using HTML mode on the grid?

I've found it impossible to format the numbers in a numeric field. Same applies for any decent date formatting, as it doesn't seem to work properly.

My solution is to format the data before it arrives to the grid (in a database query, for example), and not using a numeric or a date as the column type - displaying it as text, unformatted by the grid component.

-Fernis

BACFLAuthor
Inspiring
February 14, 2014

Fernis thank you for the reply.  I have made sure that the number is coming out of the query in the correct format (999.99), two places after the decimal.  I have removed "type=numeric" from the gridcolumn, but I am still getting the result 65.2 and not 65.20.  Did I misinterpret something you stated?

B.