decimal total = 0;
decimal price;
foreach (DataGridViewRow row in jobcardsDataGridView1.Rows)
{
if (row.IsNewRow) break;
Decimal.TryParse(row.Cells[6].Value.ToString(), out price);
total += price;
}
label1.Text = total.ToString("C");
VulpesPosted Dec 7, 2011, 12:41 PM
Try the following:
mike DelvottiPosted Dec 8, 2011, 8:52 AM