How can I delete a line form a binded DataGridView when pressing Delete key?
+1
A:
If you're on framework 3.5, it looks like there's a method on the DataGridView to process the delete key.
http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridview.processdeletekey.aspx
Otherwise, I would suggest capturing the form keypress event and working backwards to get the active/selected DataGridView row to know which one to process.
paulwhit
2008-09-18 09:42:12