Hello,
I have a grid view that bind data from other grid view (from other page) and I want the user to be able to insert quantity and then to calculate the total price.
how can I do that?
i've tried this example:
http://www.c-sharpcorner.com/blogs/7857/calculate-total-price-on-textbox-change-event.aspx
and its great but missing the grand total. how can I calculate the grand total and display it both on grid view and label?
thanks!

Dorababu MekaRank #457 · 5.5K reputationPosted Sep 4, 2012, 5:05 AM EDT
http://dotnetspeaks.net/post/Display-Total-in-GridView-Footer-using-JQuery.aspx
s44 reputationPosted Sep 4, 2012, 5:12 AM EDT
Dorababu MekaRank #457 · 5.5K reputationPosted Sep 4, 2012, 5:22 AM EDT
In page load after your grid bind add this
for (int i = 0; i < grdInvoice.Rows.Count; i++)
{
TextBox curTexbox = grdInvoice.Rows[i].Cells[1].FindControl("txtQuantity") as TextBox;
TextBox curTexbox1 = grdInvoice.Rows[i].Cells[3].FindControl("txtRate") as TextBox;
TextBox curTexbox2 = grdInvoice.Rows[i].Cells[4].FindControl("txtAmount") as TextBox;
curTexbox.Attributes.Add("onBlur", "return multiplication('" + curTexbox.ClientID + "','" + curTexbox1.ClientID + "','" + curTexbox2.ClientID + "')");
}
Rename with your controls here
This will work when you are trying to add or edit the quantity or Rate value
s44 reputationPosted Sep 4, 2012, 5:53 AM EDT
I want to calculate the total of all the totals..
my code is:
and I have this JS:
how can I add to this code the calculation of total amount?