Quantcast
Channel: Windows Forms General forum
Viewing all articles
Browse latest Browse all 12583

Pressing enter to a message box edits the datagridview - How to prevent this?

$
0
0

Dears,

I have a usual master-detail data entry form where the detail is in DataGridView. I tend to show a messagebox once the user saves the data. If the user "clicks" on the messagebox, no issues, but if the user presses enter to dismiss it, then automatically the datagridview goes in edit-mode, making cell 0 of row 0 focused.

I tried to set focus somewhere else from Save method, but it doesn't work when the user presses Enter key. The scenario expects very less mouse operation.

How can I prevent going back to datagridview? Please help.

Regards,

V


Viewing all articles
Browse latest Browse all 12583

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>