Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I have a datagrid in which I have a delete button - when clicks it asks the user for delete confirmation and does some other validation checks. This works fine and all is well. BUT, if a user clicks on the entire row in the datagrid they can delete the row and bypass my column style event and validation. What event can I capture or how can I disable the user from highlighting a row and hitting delete? Note: Cannot set the datagrid to readonly because the users are allowed to modify a few columns and this is for a WinForms App.

 

Thanks!

Posted

Tried That

 

How about checking for the KeyPress event...

 

I tried that - but according to msdn you a key pressed event only raises if a character key is pressed. So I can use the key down or key up event - but that doesn't let me cancel the key press - or atleast I couldn't find a way to cancel the event.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...