Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- decimal totalSelected = 0;
- dataGridView1.Focus();
- foreach (DataGridViewRow row in dataGridView1.Rows)
- {
- DataGridViewCheckBoxCell cell = row.Cells[0] as DataGridViewCheckBoxCell;
- if (cell.Value != null)
- {
- if (cell.Value == cell.TrueValue)
- {
- totalSelected += Convert.ToDecimal(row.Cells[3].Value);
- }
- }
- }
- lblTotalToPaid.Text = totalSelected.ToString("$0.00", CultureInfo.CurrentCulture);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement