
how to calculate gridview column total in Textbox in windows
how to calculate gridview column Unit total, Amount Total,TaxAmount Total and TotalAmount Total in Textboxs in windows application


Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Rafnas T PPosted May 30, 2017, 1:44 AM
decimal totalamount = 0;
for (int i = 0; i < dataGridView.Rows.Count; i++)
{
totalamount = totalamount+ Convert.ToDecimal(dataGridView.Rows[i].Cells[6].Value);
taxtotal = taxtotal + Convert.ToDecimal(dataGridView.Rows[i].Cells[7].Value);
}
amounttxt.Text = amouttotal.ToString();
TotalTaxtxt.Text = taxtotal.ToString();
totalamounttxt.Text = totalamount.ToString();
Jyoti JodhaPosted May 30, 2017, 1:34 AM
Manas MohapatraPosted May 30, 2017, 1:30 AM