In my APEX application, I am utilizing the Interactive grid feature. In the first row, I entered the value as 1000.00 and in the second row as 500. My goal is to calculate the total value of 1,500.00 and display it in a Hidden item.
Currently, I am able to achieve the desired result of 1,500 but the .00 portion is being removed from the total. How can I ensure that the decimal places are retained using javascript?
When trying to use parseFloat, the .00 gets stripped off.
var a = 0;
var t = 0;
//a= parseFloat($v("value"));
a= $v("value"); //row value in the loop 1000.00 in the first row and 500 in the second row
some Code.... t+= a;
return t;
Without using parseFloat, the resulting value (01,000,500) is concatenated rather than added. When using parseFloat, the .00 is removed (1,500). However, I want to retain .00 if the user enters values in that format. Is there a solution to this issue?
If you have any suggestions or solutions, please let me know. Thank you!