DataGridView 全选,反选
////// 全選 /// /// /// private void button4_Click(object sender, EventArgs e) { for (int i = 0; i < this.dataGridView1.Rows.Count; i++) { dataGridView1.Rows[i].Cells["CODE14"].Value = "1"; } } ////// 反選 /// /// /// private void button5_Click(object sender, EventArgs e) { for (int i = 0; i < this.dataGridView1.Rows.Count; i++) { dataGridView1.Rows[i].Cells["CODE14"].Value = "0"; } }