Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted on Sep 17, 2007 08:48
open dhtmlx forum
dhtmlxgrid

i need to show in the footer the total qty of row selected. how to do that. please help
Answer posted by Stanislav on Sep 18, 2007 15:48
you can attach custom code to onSelect event and use any kind of calculation here

mygrid.attachEvent("onRowSelect",function(){
    var z=mygrid.getSelectedId();
    if (z){
       z=z.split(",");
       var summ=0;
       for (var i=0; i<z.length; i++)
               summ+=mygrid.cells(z[i],INDEX).getValue()*1;  
    }
})l