[SmartClient Version: v11.0p_2016-10-07/PowerEdition Deployment (built 2016-10-07)]
This one may be tricky for me to supply you a test case because it seems to be based on behaviors associated with DB2, but perhaps my simulated example below will be enough for you to work from. This is NOT a problem in earlier versions, including Client Version: v10.0p_2016-02-18/PowerEdition Deployment (built 2016-02-18).
The problem is that certain values obtained from calculations performed on fields declared as DECIMAL types are returned to the client as strings, which causes problems with display (all the trailing zeros are displayed) and sorting (client-side sorting sorts them as alphanumeric values).
These trailing zeros are handled without issue in SmartGWT 5.0 (as noted above):
But as you can see, SmartGWT 6.0 returns the values as strings:
For background, in DB2 certain calculations on DECIMAL data types return numerous trailing zeros:
Whereas others do not:
Please don't ask me to explain why. I don't know...
To simulate this, just make the the following change to employees.ds.xml (there are 16 zeros) in the BuiltInDS sample, run it. Select "Employees" . The salary column will display with all trailing zeros.
Inspect the response with the console, and you will see the Salary was returned as a string:
Now remove one of the zeros (only 15 trailing zeros) and repeat: the Salary column values will be returned as numeric values and display without trailing zeros.
Now change the value to the left of the decimal point to 10 and leave 15 trailing zeros. Run again, and the values will display with trailing zeros again. Remove another one of the trailing zeros, and the values once again display as numerics. This might indicate that we are exceeding a limit of 16 significant digits, even though the trailing zeros should not be considered significant.
Regards,
Gary
This one may be tricky for me to supply you a test case because it seems to be based on behaviors associated with DB2, but perhaps my simulated example below will be enough for you to work from. This is NOT a problem in earlier versions, including Client Version: v10.0p_2016-02-18/PowerEdition Deployment (built 2016-02-18).
The problem is that certain values obtained from calculations performed on fields declared as DECIMAL types are returned to the client as strings, which causes problems with display (all the trailing zeros are displayed) and sorting (client-side sorting sorts them as alphanumeric values).
These trailing zeros are handled without issue in SmartGWT 5.0 (as noted above):
To simulate this, just make the the following change to employees.ds.xml (there are 16 zeros) in the BuiltInDS sample, run it. Select "Employees" . The salary column will display with all trailing zeros.
Code:
<field name="Salary" title="Salary" type="float" customSelectExpression="1.0000000000000000"/>
Now remove one of the zeros (only 15 trailing zeros) and repeat: the Salary column values will be returned as numeric values and display without trailing zeros.
Now change the value to the left of the decimal point to 10 and leave 15 trailing zeros. Run again, and the values will display with trailing zeros again. Remove another one of the trailing zeros, and the values once again display as numerics. This might indicate that we are exceeding a limit of 16 significant digits, even though the trailing zeros should not be considered significant.
Regards,
Gary
Comment