manikandan r

manikandan r

  • NA
  • 337
  • 0

Datagridview Checkbox column Problem

Sep 3 2009 2:53 AM
Hi i want to get selected Checkbox value inside a datagridview. how can i check the status of the check box.. i used following code for this. but its not working. private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) { StringBuilder sb = new StringBuilder(); for (int i = 0; i < dataGridView1.Rows.Count; i++) { if ((bool)this.dataGridView1.Rows[i].Cells[i].Value == true) { sb.Append(dataGridView1.Rows[i].Cells[i].ToString()); } } }

Answers (1)