标签:
单行选中
foreach (DataGridViewRow dr in this.dataGridView1.Rows)
{
try
{
//DataGridViewCheckBoxCell cbx = (DataGridViewCheckBoxCell)dr.Cells[0];
//if ((bool)cbx.FormattedValue)
if(dr.Cells[0].Selected)
{
arrShiftCode.Add(dr.Cells[1].Value);
arrShiftGroup.Add(dr.Cells[2].Value);
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
C# Windows DataGridView 判断CheckBox 选取的方法
标签:
原文地址:http://www.cnblogs.com/FLWL/p/4339970.html