单元样选择按钮

       //选择按钮
            if (e.ColumnIndex == dataGridView1.Columns["ColGrid1Checkd"].Index)
            {
                foreach (DataGridViewRow row in this.dataGridView1.Rows)
              //  if (Convert.ToBoolean(row.Cells["colCheck"].EditedFormattedValue))
                {
                    ((DataGridViewCheckBoxCell)row.Cells["ColGrid1Checkd"]).Value = false;
                }
                ((DataGridViewCheckBoxCell)this.dataGridView1.CurrentRow.Cells["ColGrid1Checkd"]).Value = true;
            }

posted @ 2013-05-18 18:31  xki  阅读(143)  评论(0编辑  收藏  举报