Skip to main content
kenc66324322
Inspiring
August 9, 2019
Question

Flash CFGrid and floating point values

  • August 9, 2019
  • 1 reply
  • 242 views

Hi there,

I am using CF2018 update 4 and flash player 32.0.0.223.  I have a cfgrid populated from a query.  One of the columns contain single percision floating point values between 2 and 60, usualy up to 5 significant figures.  For example, a value of 7.2 appers as 7.19999980926514 in the flash grid, but appear as 7.2 in html and java grid. 

I tried setting a mask of 99.9999 for the column and it appears as 00.0000 for every row!  Any other settings I can use to correct the display issue or is this a bug?

Can't use HTML grid until the fix for 4024128 is released so I am stuck with the java grid for the moment.

Thanks in advance.

    This topic has been closed for replies.

    1 reply

    BKBK
    Community Expert
    Community Expert
    August 12, 2019

    Could you share your code?

    kenc66324322
    Inspiring
    August 13, 2019

    The code is pretty simple with the screen shot showing the result:

    <cfquery name="getData" datasource="datasource1">
      select * from TestResult
    </cfquery>

    <cfdump var=#getData#>

    <cfform name="users1" action="#actionURL#" method="post">
    <cfgrid name="users" query="getData" selectmode="edit" height="400" width="850" format="flash">
    </cfgrid>
    <input type="submit" value="Commit Changes">
    </cfform>

    kenc66324322
    Inspiring
    August 13, 2019

    May have found a workaround.  If I loop through the query and specify the values for each row, then the flash grid display the floating point value correctly.

    <cfform name="users1" action="#actionURL#" method="post">
    <cfgrid name="users" selectmode="edit" height="400" width="850" format="flash">


    <cfgridcolumn name="index">
    <cfgridcolumn name="labresult">


    <cfloop query=getData>
    <cfgridrow data="#index#,#labResult#">
    </cfloop>


    </cfgrid>

    <input type="submit" value="Commit Changes">
    </cfform>