Mathematical Calculation and Radio Button Click

Hi,



I have two queries



My first query is,



1. One of our requirement is that …suppose we have 5 rows … and the first column of the first row is the sum of 2nd,3rd,4th and 5th rows first columns …

Ex:

1 2 3

1 1000

2 100

3 400

4 300

5 200



do we have any simpler dhtmlx way of resolving this or do I manually have to do grid.cells(1,0).setValue(sum of all other row’s 1st coulmn) ?



My second query is,



2. How do I know when a radio button is clicked in a cell? …Which event does it fire? As soon as a radio button in column 3 is clicked I have to add all the values in Column 2. How do I achieve this?.. Which event do i code in?



Can you please mail the reply to soumya.sandeep@3i-infotech.com. It would be of great help.



Many Thanks in advance

soms











  1. You can insert following formula in the first row cells:
    =[[2,0]]+[[3,0]]+[[4,0]]+[[5,0]]
    =[[2,1]]+[[3,1]]+[[4,1]]+[[5,1]]
    =[[2,2]]+[[3,2]]+[[4,2]]+[[5,2]]

    Column types in those cells should be defined with Math formula or as type �math�.

    2. You can catch radio button click using “onClick” event. onCheck event passes the following parameters:
    rId - id or the row;
    cInd - index of the cell;
    state- state of the checkbox/radiobutton.
    grid.attachEvent(“onCheck”, function(rId,cInd,state){});