I have 4 columns in a grid. I need the value in the second column divided by the

I have 4 columns in a grid. I need the value in the second column divided by the 3rd column and entered in the 4th column. So if 10000 is the second value and the 3rd column is 400 I need the 4th column autocalculated to 25. See the attached screenshot for assistance.

Divide values in grid.gif

OriginalPostID-139290

OriginalPostID-139290

  Discussion posts and replies are publicly visible

Parents
  • If it is a normal grid (not paging grid), you can place JavaScript/Jquery functions as you need (on change, on blur events on 2nd,3rd columns)
    1. you can use get value and set value methods to retrieve data from 2nd column, 3rd column by using fieldIds (like FormAPI.setvalue() and get value())
    2. define variable by calculating both of them and set that value to the 4th column.
    But here the crafty things is to get the index of that row from a dynamic grid view (adding/deleting rows).
    If it is fixed set of rows, then just iterate the rows and calculate it using for loop.
Reply
  • If it is a normal grid (not paging grid), you can place JavaScript/Jquery functions as you need (on change, on blur events on 2nd,3rd columns)
    1. you can use get value and set value methods to retrieve data from 2nd column, 3rd column by using fieldIds (like FormAPI.setvalue() and get value())
    2. define variable by calculating both of them and set that value to the 4th column.
    But here the crafty things is to get the index of that row from a dynamic grid view (adding/deleting rows).
    If it is fixed set of rows, then just iterate the rows and calculate it using for loop.
Children
No Data