Hi everyone
I have a datagridview with a checkbox culumn. I want to check whether the check box cell is checked or unchecked. my code is as below.
it does work for the checked cell but when i uncheck one of the checked it does not remove it from the arraylist.
ArrayList subs=new ArrayList();
foreach(DataGridViewRow row in dgv_sub.Rows)
{
if ((bool)row.Cells[0].Value !=null)//Checked
{
string su = row.Cells[1].Value.ToString();
subs.Add(su);
}
}
foreach (string s in subs)
{
MessageBox.Show(s);
}
subs.Clear();