dhtmlxgrid

Hi,



We are working with professional version.



We are using in the first column a math type (for example with =c2+c3+c4) and an total in last row using

attachFooter and functions that calculate the footer values (calculateFooterValues). It works ok except in the math type that return “NaN”. But when I fired another event using the function calculateFooterValues it works ok.



We use this funcions:



    function calculateFooterValues(){

        var nrQ = document.getElementById(“nr_q”);

        nrQ.innerHTML = sumColumn(1);

    }

    



    function sumColumn(ind){

        var out = 0;

        for(var i=0;i<mygrid.getRowsNum();i++){

            out+= parseFloat(mygrid.cells2(i,ind).getValue())

        }

        return out;

    }









Can you help us?



Thanks in advance.



The math excell can be calclulated with some delay ( with occur if on moment of creating other cells involved in formula not exists yet ), default version of dhtmlxGrid doesn’t provide any way to detect moment when all cells calculated in grid ( and total can be calculated in your case ).

Please contact us directly at dhtmlx@scand.com and I will provide an updated version which has “onMathEnd” events, which fire when all math cells correctly calculated and grid ready to further usage.