+ Start a Discussion
Chandra babu 2Chandra babu 2 

how to sum two columns fields and display the value another column

Amount   :
Discount :

Net price :


In the UI page  i will give amount value and Discount value .so these two values add and  Display directly   show on  UI page.please tel me.
Rohini AherRohini Aher
Hi Chandra, 

You can achieve this using Javascript or action function. Using javascript(document.getElementById for both amopunt and discount) you can get the values in script and then calculate in script itself and again using document.getelementById you can assign that value to net price.

And using action you can do all operations in apex class and assign the value to Net price variable  and then you can rerender the Net price  column  to show refreshed values. 

Hope this helps you!

 
Chandra babu 2Chandra babu 2
please tel me hoewto write the code in class and page
Hemali PatelHemali Patel
you can achieve it using wrapper class .