private void DataGridView1_UserDeletingRow(

object sender, DataGridViewRowCancelEventArgs e)

{

if (!(e.Row.IsNewRow))

{

DialogResult response 
=

MessageBox.Show(
"您确定要删除此笔数据行吗?""请确认",

MessageBoxButtons.YesNo,

MessageBoxIcon.Question,

MessageBoxDefaultButton.Button2);

if (response == System.Windows.Forms.DialogResult.No)

{

e.Cancel 
= true;

}

}

}

相关文章:

  • 2021-11-22
  • 2021-07-18
  • 2022-12-23
  • 2022-12-23
  • 2021-06-23
  • 2022-12-23
  • 2021-11-04
  • 2022-12-23
猜你喜欢
  • 2021-06-11
  • 2022-02-03
  • 2022-01-26
  • 2022-02-04
  • 2021-06-19
  • 2021-08-28
  • 2021-12-28
相关资源
相似解决方案