You need to sign in to do that
Don't have an account?
Tiwari_Shweta
Add row In DataTable using Ajax
Hi I am creating the following datatable :
Check | Account Name | List Price 1 | List price 2 |
y | Acc1 | 223 | 67 |
n | Acc2 | 45 | 89 |
Total | 223 | 67 |
Here in check column, check boxes are there.I have acheived the functionality that when check box is clicked the sum of corresponding row is calculated but now I have to show the total below the table (highlited row) in this format.
Can anybody help that How can I acheive the functionality using ajax.
This can be achieved using javascript and div or input box, when you are calculating the total on the click of the checkbox, how should assign the total to the div or input box which will be positioned as shown in your post. In case you are using div you have to dynamically set the innertext or innerHTML. In case you are using input box you will have to update the value dynamically as follows:-
document.getElementById("Inputbox").value= calculatedTotal.
Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.