datagridview 有checkbox a b c 按钮aa bb cc
怎样电机aa 选择全部的a 点击bb选择全部的b c同上
for (int i = 0; i < dataGridView1.Rows.Count; i++)
{
dataGridView1.Rows[i].Cells[0].Value = true;
}
这种写法无效
望高手指点指点
怎样电机aa 选择全部的a 点击bb选择全部的b c同上
for (int i = 0; i < dataGridView1.Rows.Count; i++)
{
dataGridView1.Rows[i].Cells[0].Value = true;
}
这种写法无效
望高手指点指点
{
row.Cells[0].Value = true;
}
这是什么啊
DGV没有提供这样的遍历接口
dataGridView1.Rows[1].Cells[0].Value = true;
{
foreach (DataGridViewRow dr in this.dataGridView1.Rows)
{
dr.Cells[0].Value = true;
}
}
我刚试验过,好用的
{
//St.Chexk_All_Start(dataGridView2);
foreach (DataGridViewRow dr in this.dataGridView2.Rows)
{
dr.Cells[4].Value = true;
}
}
this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.Column1});
this.set_id,
this.Column1,
this.Column2,
this.Column3,
this.set_start_id,
this.Column4,
this.set_end_id,
this.Column5,
this.set_sys1_id,
this.Column6,
this.set_sys2_id,
this.Column7,
this.set_mode1_id,
this.Column8,
this.set_mode2_id,
this.Column9,
this.set_shi_du,
this.set_wen_du,
this.set_ok});
那