<script type="text/javascript"> function Calctotal_pre(PreviousValue, txtvalue, TotalValue) { var uservalue = parseFloat(document.getElementById(txtvalue).value); var TotalVar = document.getElementById(TotalValue); var TotalValue = parseFloat(PreviousValue + uservalue ); TotalVar.innerHTML = TotalValue; var total_allPY = 0; $($("[id*=GvList] [id*=lbl_sum]")).each(function () { if (!isNaN(parseFloat($(this).val()))) { total_allPY += parseFloat($(this).val()); } }); $("[id*=GvList] [id*=lbl_PY_total]").html(total_allPY); } </script> ----------------CODE PART-------------- protected void GvList_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { Label lblList = (Label)e.Row.FindControl("lbl_pre"); PreVal += Convert.ToDecimal(lblList.Text); txt_pre.Attributes.Add("onkeyup", "Calctotal_pre(" + PreVal + ", '" + txtqut.ClientID + "','" + lbl_sum.ClientID + "')"); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)