Thank heavens. Been having trouble with the fabled .NET DataGrid "last edit not saved" issue that's usually solved by doing something like this:

It is caused by the DataGrid cell still held the focus when the menu is clicked. You may try the following two ways to workaround it:

1. Call the DataGrid.EndEdit method in the menu handler.
2. Set the focus to other control before saving data.

Unfortunately this wasn't working for me in one case... My GUI was in a UserControl on a Form, and the Form had buttons that would call a "saveDataset" like function that was a method of my UserControl. Clicking the buttons on the form would fire off the UserControl's save event and the "change focus" bit worked, no problem. But using a shortcut key to the button (when the .Text property = something like "&Click Me") wasn't working.

Anyhow, the trick is to toss in an Application.DoEvents (I kept trying to force HandleEvents to work from my VB6 days, I guess) after changing the focus. Voila.