首页 > 代码库 > winfrom 中datagridview中checkbox的使用方法

winfrom 中datagridview中checkbox的使用方法

   private void dgdv_skjs_CellContentClick(object sender, DataGridViewCellEventArgs e)        {            if (e.RowIndex != -1)            {                DataGridViewCheckBoxCell checkCell_rxwk = (DataGridViewCheckBoxCell)dgdv_skjs.Rows[e.RowIndex].Cells["rxwk"];                DataGridViewCheckBoxCell checkCell_bx = (DataGridViewCheckBoxCell)dgdv_skjs.Rows[e.RowIndex].Cells["bx"];                bool rxwk = Convert.ToBoolean(checkCell_rxwk.Value.ToString());                bool bx = Convert.ToBoolean(checkCell_bx.Value.ToString());                if (e.ColumnIndex == 3 )                {                    if (rxwk == false && bx == true)                    {                        checkCell_rxwk.Value = http://www.mamicode.com/true;>

效果图如下: