Background I have a custom collection that is binded to the datagridview
this.datagridview.DataSource = mycollection
I have a delete button on the user interface . User can click on the delete button to delete the selected DX Directory.
Some entried cannot be deleted so I Enable and Disable "delete button".
It works fine in case user user deletes entry by clicking the delete butoon.
The problem is :
When user pressed the "delete" button from the "keyboard"
How can trap key board "Delete" button.. When I press delete button from the keyboard:
--it deletes a selected row from the datagrid view.. --When user click save .. it also saves it into Xml as well..
To correct this I have handled _RowRemoved event of datagrid view.. but still no help
Please Help
Attach to the UserDeletingRow event, and cancel the deletion (when required) by setting e.Cancelled = true
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With