为什么DataGridViewCheckBoxCell列的Readonly属性设置为True了,它还是可以选择的呢?各位大哥帮帮忙?急!
具体代码dt = opt.QueryByDate(begin, end, customer, state, PaperNo, HasBack, HasInvoice, DealWithNm, AffirmNm );
this.dataGridView1.DataSource = dt;
for (int i = 0; i < dt.Rows.Count; i++)
{
if (this.dataGridView1.Rows[i].Cells["psHasback"].Value.ToString() == "0")
{
//this.dataGridView1.Rows[i].Cells["HasBack"]).ReadOnly = true;
((DataGridViewCheckBoxCell)this.dataGridView1.Rows[i].Cells["HasBack"]).ReadOnly = true;
}
}
即当psHasback列的值为0时,HasBack列的checkbox显示为灰色不可选。 --------------------编程问答-------------------- 怎么没人帮忙啊?
补充:.NET技术 , C#