Torna al Thread
private void dgwListe_CellMouseUp(object sender, DataGridViewCellMouseEventArgs e)
{
int iContatti = 0;
DataGridViewCheckBoxCell cbxCell;
foreach (DataGridViewRow row in dgwListe.Rows)
{
cbxCell = row.Cells["ID"] as DataGridViewCheckBoxCell;
bool bChecked = (null != cbxCell && null != cbxCell.Value && true == (bool)cbxCell.Value);
if (true == bChecked)
{
iContatti += Convert.ToInt32(row.Cells["Contatti"].Value);
}
}
lblDisplay.Text = "Sono stati selezionati ( " + Convert.ToString(iContatti) + " ) indirizzi a cui inviare la newsletter.";
}