private void DeleteToolStripMenuItem_Click(object sender, EventArgs e) { if (!(GridOptins.CurrentCell.Value is string item)) { return; } var mess = MessageBox.Show($"Действительно удалить вариант {item} ? ", "Удаление", MessageBoxButtons.YesNo); if (DialogResult.Yes == mess) { question.AnswerOptions.Remove(new QuestionOp(item)); QuestionopionsBindingSource.ResetBindings(false); QuestionBindingSourceCbox.ResetBindings(false); } }
private void NataGridView1_CellEndEdit(object sender, DataGridViewCellEventArgs e) { QuestionBindingSourceCbox.ResetBindings(false); }