decimal val=0; foreach (DataGridViewRow item in dataGridView1.Rows) { if (item.Cells[1] != null && item.Cells[1].Value != null) val += Convert.ToDecimal(item.Cells[1].Value); } MessageBox.Show(val.ToString());
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)