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."; }
Copyright © dotNetHell.it 2002-2024
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5