function calculateGridTotal() {
var tmpgvRenewal = document.getElementById("gvRenewal");
var Price = 0.0;
var Quantity = 0.0;
var TotalPrice = 0.0;
var arrstr = tmpgvRenewal.id + "_ctl";
for (var i = 2; i <= tmpgvRenewal.childNodes[0].childNodes.length - 1; i++) {
if (parseInt(i) < 10) {
var c = "0" + i;
}
else {
var c = i;
}
var lblQuantity = document.getElementById(arrstr + c + "_lblQuantity").innerHTML;
var lblPrice= document.getElementById(arrstr + c + "_lblPrice").innerHTML;
lblQuantity= lblQuantity.replace(/,/g, '');
lblPrice = lblPrice.replace(/,/g, '');
if (lblQuantity != "")
Quantity = Quantity + parseFloat(lblQuantity);
if (lblPrice!= "")
Price = Price + parseFloat(lblPrice);
}
TotalPrice = Price * Quantity;
tmpgvRenewal.rows[tmpgvRenewal.rows.length - 1].cells[2].innerHTML = Quantity;
tmpgvRenewal.rows[tmpgvRenewal.rows.length - 1].cells[3].innerHTML = Price;
tmpgvRenewal.rows[tmpgvRenewal.rows.length - 1].cells[4].innerHTML = TotalPrice;
}
try this java script. to calculate total of grid element and assin into footer.