private void ChangeToolStripMenuItem_Click(object sender, EventArgs e) { ToolsDetailForm toolsDetailForm = new ToolsDetailForm(GetOneToolsInfoFromGrid()); if (toolsDetailForm.ShowDialog() == DialogResult.OK) { Show(); } //toolsDetailForm.ShowDialog(); }
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) { if (dataGridView1.Columns[e.ColumnIndex] is DataGridViewButtonColumn && e.RowIndex > -1) { DataGridViewButtonCell btnCell = dataGridView1.CurrentCell as DataGridViewButtonCell; if (btnCell != null) { ToolsDetailForm toolsDetailForm = new ToolsDetailForm(GetOneToolsInfoFromGrid()); if (toolsDetailForm.ShowDialog() == DialogResult.OK) { Show(); } } } }