Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

get cfgrid to stop rounding numbers, need 2 decimal places

Participant ,
Feb 12, 2014 Feb 12, 2014

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.

715
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Feb 12, 2014 Feb 12, 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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Feb 14, 2014 Feb 14, 2014
LATEST

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources