G
Guest
I have a win form having DataGridView and one button which is accept button
for this form. Now when the focus is on form, enter key causes click event of
accept to fire. But when the focus is on DataGridView, enter key does not
fire click event of accept button.
I want click event to fire when focus is on DataGridView and user presses
enter key.
Steps to reproduce:
1) In WinForm application, add DataGridView and Button
2) Set added button as accept button and add click event for this button
3) Now run the application and click the DataGridView. The focus is on
DataGridView and pressing enter key, click event of button does not fire.
4) Run the application and set focus to form. Pressing enter key fires click
event of button.
Anyone knows how to solve this problem?
Thanks
for this form. Now when the focus is on form, enter key causes click event of
accept to fire. But when the focus is on DataGridView, enter key does not
fire click event of accept button.
I want click event to fire when focus is on DataGridView and user presses
enter key.
Steps to reproduce:
1) In WinForm application, add DataGridView and Button
2) Set added button as accept button and add click event for this button
3) Now run the application and click the DataGridView. The focus is on
DataGridView and pressing enter key, click event of button does not fire.
4) Run the application and set focus to form. Pressing enter key fires click
event of button.
Anyone knows how to solve this problem?
Thanks