获取DataGridViewCheckBoxColumn选中的值

  string[] str = new string[dgv.Rows.Count];

int i;


                for (i = 0; i < dgv.Rows.Count; i++)
                {
                    if (dgv.Rows[i].Selected == true)
                    {
                      
                        rows = dgv.Rows[i].Cells[1].Value.ToString();
                        要用的值 = rows;
                    }
                }


你可能感兴趣的:(获取DataGridViewCheckBoxColumn选中的值)