for (int i = 0; i < this.dataGridView1.Rows.Count; i++)
{
DataGridViewCheckBoxCell cb = (DataGridViewCheckBoxCell)this.dataGridView1.Rows[i].Cells[0];
bool flag = Convert.ToBoolean(cb.Value);
if (flag==true)
{
this.dataGridView1.Rows[i].Selected = true;
index.Add(i);
}
}
C#Winform判断DataGridView中的checkbox列是否选中
最新推荐文章于 2024-08-19 09:44:23 发布