Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. double a,b,c,d,total = 0;
  2.  
  3. foreach(DataGridViewRow row in dataGridView1.Rows)
  4. {
  5. foreach(DataGridViewColumn col in dataGridView1.Columns)
  6. {
  7. a = Convert.ToDouble(row.Cells[3].Value);
  8. b = Convert.ToDouble(row.Cells[4].Value);
  9. c = Convert.ToDouble(row.Cells[5].Value);
  10. d = Convert.ToDouble(row.Cells[6].Value);
  11. total = a + b + c + d;
  12. MessageBox.Show(total.ToString());
  13. }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement