Datagrid
-
Hi function TotalBudgetAmount() { var intCount=2; var txtBudgetAmount= document.getElementById("dgridBudgetAllocationDetails__ctl"+intCount+"_txtCurrentBudgetAmount"); var TotalAmount=0; while (txtBudgetAmount != null) { alert("hai"); if (parseFloat(txtBudgetAmount.value)) TotalAmount = TotalAmount + parseFloat(txtBudgetAmount.value) intCount += 1; var txtBudgetAmount=document.getElementById("dgridBudgetAllocationDetails__ctl"+intCount+"_txtCurrentBudgetAmount"); } var lblTotalBudgetAmount = document.getElementById("dgridBudgetAllocationDetails__ctl" +intCount+"_lblTotalAmount"); if (lblTotalBudgetAmount != null) document.write("The number is "+ parseFloat(TotalAmount).toFixed(2)) } this is my code here i need to add text bob value and put in to label but here values are not adding i thougt error in var txtBudgetAmount= document.getElementById("dgridBudgetAllocationDetails__ctl"+intCount+"_txtCurrentBudgetAmount"); this line please review this and reply me thank u reg nantha
-
Hi function TotalBudgetAmount() { var intCount=2; var txtBudgetAmount= document.getElementById("dgridBudgetAllocationDetails__ctl"+intCount+"_txtCurrentBudgetAmount"); var TotalAmount=0; while (txtBudgetAmount != null) { alert("hai"); if (parseFloat(txtBudgetAmount.value)) TotalAmount = TotalAmount + parseFloat(txtBudgetAmount.value) intCount += 1; var txtBudgetAmount=document.getElementById("dgridBudgetAllocationDetails__ctl"+intCount+"_txtCurrentBudgetAmount"); } var lblTotalBudgetAmount = document.getElementById("dgridBudgetAllocationDetails__ctl" +intCount+"_lblTotalAmount"); if (lblTotalBudgetAmount != null) document.write("The number is "+ parseFloat(TotalAmount).toFixed(2)) } this is my code here i need to add text bob value and put in to label but here values are not adding i thougt error in var txtBudgetAmount= document.getElementById("dgridBudgetAllocationDetails__ctl"+intCount+"_txtCurrentBudgetAmount"); this line please review this and reply me thank u reg nantha
pass it with the arguments _lblTotalAmount.ClientID For More Info Send me whole Code
Best Regards, Chetan Patel