Highlighted

Flash CFGrid and floating point values

Community Beginner ,
Aug 08, 2019

Copy link to clipboard

Copied

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.

Views

55

Likes

Translate

Translate

Report

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

Flash CFGrid and floating point values

Community Beginner ,
Aug 08, 2019

Copy link to clipboard

Copied

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.

Views

56

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Aug 08, 2019 0
Adobe Community Professional ,
Aug 12, 2019

Copy link to clipboard

Copied

Could you share your code?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 12, 2019 0
Community Beginner ,
Aug 12, 2019

Copy link to clipboard

Copied

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>

fg1.png

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 12, 2019 0
Community Beginner ,
Aug 12, 2019

Copy link to clipboard

Copied

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>

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 12, 2019 0