Я хочу удалить свою запись? Ошибка в функции MessageBox
I have made deleting Msgbox... 1. it was deleted successfully 2. But when i give no again it was deleted Problem is: if i choose "NO" dont delete the record in datagridview as well as datasource and keep as it is
Что я уже пробовал:
<pre>If True Then If MessageBox.Show("Do You Want To Remove This Row", "Remove Row", MessageBoxButtons.YesNo, MessageBoxIcon.Stop) = DialogResult.Yes Then DataGridView1.Rows.RemoveAt(DataGridView1.CurrentRow.Index) Else MessageBox.Show("Row Not Removed", "Remove Row", MessageBoxButtons.OK, MessageBoxIcon.Information) DataGridView1.Rows.Add(DataGridView1.CurrentRow.Index) End If End If