private void setTidakAktifToolStripMenuItem_Click(object sender, EventArgs e) { for (int i = 0; i < this.gridUser.Rows.Count -1; i++) { int c = 0; //if (Convert.ToBoolean(this.gridUser.Rows[i].Cells["ColCheckBox"].Value) == true) //not working DataGridViewCheckBoxCell chk = (DataGridViewCheckBoxCell)this.gridUser.Rows[i].Cells["ColCheckBox"]; if (Convert.ToBoolean(chk.Value) == true) c++; } //also not working //foreach (DataGridViewRow row in this.gridUser.Rows) //{ // if (Convert.ToBoolean(((DataGridViewCheckBoxCell)row.Cells["ColCheckBox"]).Value) == true) // c++; //} //MessageBox.Show(c.ToString()); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)