if (dataGridView1.Rows.Count == 0) { MessageBox.Show("Please first a search a record"); return; } if (ch_cast.Checked == true) { dataGridView1.Columns[10].Visible = true; } else { dataGridView1.Columns[10].Visible = false; } if (ch_doa.Checked== true) { dataGridView1.Columns[8].Visible = true; } else { dataGridView1.Columns[8].Visible = false; } if (ch_dob.Checked == true) { dataGridView1.Columns[3].Visible = true; } else { dataGridView1.Columns[3].Visible = false; } if (ch_fn.Checked == true) { dataGridView1.Columns[6].Visible = true; } else { dataGridView1.Columns[6].Visible = false; } if (ch_mn.Checked == true) { dataGridView1.Columns[7].Visible = true; } else { dataGridView1.Columns[7].Visible = false; } if (ch_regno.Checked == true) { dataGridView1.Columns[9].Visible = true; } else { dataGridView1.Columns[9].Visible = false; } if (ch_smn.Checked == true) { dataGridView1.Columns[5].Visible = true; } else { dataGridView1.Columns[5].Visible = false; } if (checkBox1.Checked == true) { dataGridView1.Columns[11].Visible = true; } else { dataGridView1.Columns[11].Visible = false; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)