HOW TO SUM THE VALUE OF GRIDVIEW COLUMN "TOTAL" IN MY TEXT BOX ON BTN CLICK EVENT IN C#.NET .
PLEASE FIND SAMPLE BELOW.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
IsraelRank #1,223 · 1.5K reputationPosted Feb 18, 2015, 1:45 AM EST
If this answer helps you. Please validade as "correct". This is the way to encourage people to continue to help.
Khargesh RajputRank #616 · 3.9K reputationPosted Feb 18, 2015, 12:17 AM EST
{
int sum = 0;
for (int i = 0; i < dataGridView1.Rows.Count; ++i)
{
sum += Convert.ToInt32(dataGridView1.Rows[i].Cells[4].Value);
}
txtsum.text = sum.ToString();
}