Skip to main content
kenc66324322
Inspiring
Aug 9, 2019 12:02 AM UTC
Question

Flash CFGrid and floating point values

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 is closed to new replies. Start a new post to keep the conversation going.

    3 replies

    BKBK
    Community Expert
    Community Expert
    Aug 12, 2019 7:07 PM UTC

    Could you share your code?

    Translate
    kenc66324322
    Inspiring
    Aug 13, 2019 12:12 AM UTC

    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>

    Translate
    kenc66324322
    Inspiring
    Aug 13, 2019 12:20 AM UTC

    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>

    Translate