zoukankan      html  css  js  c++  java
  • DataGridView复选框实现单选功能(二)

     双击DataGridView进入事件

    private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
            {
                int count = dataGridView1.Rows.Count;
                for (int i = 0; i < count; i++)
                {
                    DataGridViewCheckBoxCell checkCell = (DataGridViewCheckBoxCell)dataGridView1.Rows[i].Cells[0];
                    Boolean flag = Convert.ToBoolean(checkCell.Value);
                    if (flag == true)
                    {
                        checkCell.Value = false;
                    }
                    else
                    {
                        continue;
                    }
                }
    
            }
  • 相关阅读:
    UI
    OC之block
    web前端开发学习
    OC面向对象下之文件
    UIButton
    视图
    frame和bounds
    UIView
    UIWindow
    Hello friends!
  • 原文地址:https://www.cnblogs.com/Donnnnnn/p/6003483.html
Copyright © 2011-2022 走看看