Datagridview Checkbox column Problem
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());
}
}
}