hello,
Am trying to retrieve values from footer.
Here is the code:
function calculateFooterValues(stage) {
if (stage && stage != 2);
return true;
var nrQ = document.getElementById(“nr_q”);
nrQ.innerHTML = sumColumn(3);
return true;
}
function sumColumn(ind) {
var out = 0;
for (var i = 0; i < mygrid.getRowsNum(); i++) {
out += parseFloat(mygrid.cells2(i, ind).getValue());
}
return out;
}
mygrid = new dhtmlXGridObject(‘gridbox’);
mygrid.setImagePath("…/…/codebase/imgs/");
mygrid.setHeader(“Material Category,#cspan,Raw Material,#cspan,Finished Goods,#cspan”);
mygrid.attachHeader(“Name,Name,Price,Sold,Price,Sold”);
mygrid.setInitWidths(“150,170,50,80,50,*”);
mygrid.setColAlign(“left,left,right,right,right,right”);
mygrid.setColTypes(“ro,ro,price,ed,price,ed”);
mygrid.setColSorting(“str,str,int,int,int,int”);
mygrid.setSkin(“dhx_skyblue”);
mygrid.attachEvent(“onEditCell”, calculateFooterValues);
mygrid.setSkin(“dhx_skyblue”);
mygrid.init();
mygrid.attachFooter(“Total quantity,#cspan,-,
mygrid.loadXML("/common/data_values.xml", calculateFooterValues);
I have a NET AMOUNT column in my grid. I am getting the sum total of values of the NET AMOUNT column visible in my footer but can someone please guide me how do i retrieve the footer value either thorough javascript function or through rxml or through any other means.
Urgent attention to this possible will be helpful.
Thanks
Anirudh