How can I restrict/prevents the records to be deleted from Keyboard. “Delete” key.
or When i press the Delete Key from the keyboard it asking message whether the records to be Deleted with yes/No option.
how can i override the existing functionality when the user press DeleteKey .i don't want to display the message box
You can do this with some simple eventhandling.
I prefer the Grid's Keydown (ex : Ultragrid1_Keydown) event because of the many eventargs available.
I've used this code before in my application:
If e.KeyCode = Keys.Delete Then
'De Nada
Exit Sub
You can catch any keycode you want. Use ActiveCell, ActiveRow, ActiveColumn to restrict user access if you want.
Thank you for your timely help and guidance to resolve the issue
Best Regards
R.Balaji
No problem. I'm happy to help.
GeirNorway