private void btnSelectFields_Click(object sender, EventArgs e) { dlgSelectMonitorFields dlg = new dlgSelectMonitorFields(); dlg.StartPosition = FormStartPosition.CenterParent; if (dlg.ShowDialog() == DialogResult.OK) { ShowFields = dlg.MonitorFields; dataGridView1.Rows.Clear(); dataGridView1.Columns.Clear(); SetColumns(); } }