日期:2014-05-19  浏览次数:20760 次

dataGridView 问题
我的DataGridViewCheckBoxColumn为什么总选择不了用这个
  private   void   DataGridView1_CellContentClick(object   sender,   DataGridViewCellEventArgs   e)
                {

                        if   (e.ColumnIndex   ==   0)
                        {
                                dataGridView1.Rows[e.RowIndex].Cells[0].Value   =   (bool)dataGridView1.Rows[e.RowIndex].Cells[0].EditedFormattedValue;

                        }
                }
dataGridView1.Rows[e.RowIndex].Cells[0].EditedFormattedValue;这个总是返回false


------解决方案--------------------
这样设置就可选中:
this.dataGridView1.Rows[e.RowIndex].Cells[0].Value = "true ";