hammerman Posted March 9, 2004 Posted March 9, 2004 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! Quote
wessamzeidan Posted March 10, 2004 Posted March 10, 2004 How about checking for the KeyPress event... Quote Proudly a Palestinian Microsoft ASP.NET MVP My Blog: wessamzeidan.net
hammerman Posted March 10, 2004 Author Posted March 10, 2004 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. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.