void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (e.ColumnIndex == 0 || e.RowIndex == -1 || e.ColumnIndex == -1) { return; } if ((string)dataGridView1[0, e.RowIndex].Value == "proc_type") { MessageBox.Show("Trie"); } if ((string)dataGridView1[0, e.RowIndex].Value == "id_sub_type") { if (_globalSelector == null) { _globalSelector = new GlobalSelector(); } if (!_globalSelector.Opened) { var dataGridViewCell = dataGridView1[1, e.RowIndex]; _globalSelector.Display(comboBox1.SelectedIndex, ref dataGridViewCell); } } }
void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (e.ColumnIndex == 0 || e.RowIndex == -1 || e.ColumnIndex == -1) return; if ((string) dataGridView1[0, e.RowIndex].Value == "proc_type") MessageBox.Show("Trie"); if ((string)dataGridView1[0, e.RowIndex].Value == "id_sub_type") { if(_globalSelector == null) _globalSelector = new GlobalSelector(); if(!_globalSelector.Opened) { var dataGridViewCell = dataGridView1[1,e.RowIndex]; _globalSelector.Display(comboBox1.SelectedIndex,ref dataGridViewCell); } } }