Hi everyone
Forge of Data Grid Web is used in the program.
As the picture shows, I set the DataType of the column to Decimal, and then the value obtained by dividing 0.001 by 1000 is displayed on the screen, the screen uses the GridColumnNumber widget, but the screen indicates 0.00, not 0.000001. only two digits are displayed, not all. When downloaded to excel, there are also only two decimal places.
What should I do if I want to display all decimals when the DataType must be Decimal?
Screen display result
Excel download result
Any suggestion is appreciated.
Kind Regards
Hi @YITONG LYU ,
In the link I sent you above there are more formatting options you can try. I believe that the one you are seeking is the g* specifier. Check the example below:
Regards,
Giuliana.
Hi Yi Tong,
I believe you are trying to populate the number with decimal places in table. Try to check the format expression used to display the netweight.
@Won Jien Liew
Thank you Replay.
Above is the example I gave for the following data.
On the left is the data and processing in the table, and on the right is the data that I want to display on the screen
1. 4200.000 → 4200
2. 0.001/1000 → 0.000001
3. 32566/1000 → 32.566
What is the best way to do it?
If there is no specific format that you want to set for decimals, you can directly use the variable without FormatDecimal function. The expression is smart enough to automatically adjust its format based on the respective value.
https://success.outsystems.com/documentation/11/reference/outsystems_language/logic/built_in_functions/format/#FormatDecimal
Hi, @YITONG LYU
Have you tried using the AdvancedFormat field in GridColumnNumber? There you can set the number format you want based on Wijmo's formatting options.
Here is an example of how to use it:
Regarding the excel file, there is nothing we can do about it since it is an Excel default behavior. You will need to check how to format the Excel column to display the decimal places you want.
@Giuliana Silva
Thank you for your Replay.
I tried the method you described. I set that to format:n6.
All decimals are turned into six digits.
Example:
0.23 → 0.230000
1 → 1.000000
0.00001 → 0.000010
I don't want to fix the number of decimal places, just display as many as there are.
0.23 → 0.23
1 → 1
0.00001 → 0.00001
Thank you very much.
The result I wanted displayed on the screen now.
But the excel download automatically complements 0.
Here's how I downloaded my excel and the excel download result.
How can I get the excel results to be the same as on the screen?