Friday, 15 February 2013

c# - Need to issue a confirmation dialog when "Delete" key is pressed -


OK, so I have a datagroup view that is bound to my data.

I've coded it with some buttons in "edit" mode or in "non-editing" mode and

  DGV smrgr.Radonely = true; // Incorrect if applicable  

The user also has the permission to delete the rows, but I have to write it in my database. The foreign key is affecting and thus I would like to call a warning confirmation dialog with:

  DialogResult = MessageBox.Show (); If (DialogResult == DialogResult.Yes) {} else if (DialogResult == DialogResult.No.) {}  

This is also ok with me.

My problem is I am not really catching the right event (I think), and I am not sure exactly how to delete the process.

 

and

Code> Keyboard

Events.

I do not have much experience with Winforms, but I think the event is only what you find Are there.


No comments:

Post a Comment