Bug 5420 - DataGridView does not call EndEdit on leave
Summary: DataGridView does not call EndEdit on leave
Alias: None
Product: Class Libraries
Classification: Mono
Component: Windows.Forms ()
Version: 2.10.x
Hardware: PC Linux
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2012-05-30 14:59 UTC by Steve
Modified: 2012-06-22 14:48 UTC (History)
2 users (show)

Is this bug a regression?: ---
Last known good build:

My patch for the problem (524 bytes, patch)
2012-06-02 09:45 UTC, Steve

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Steve 2012-05-30 14:59:15 UTC
While debugging some different behavior in our Linux and MS Windows version of our WinForms-based project, I found that I had to add a Leave event-handler to my data-grid-view that calls EndEdit (DataGridViewDataErrorContexts.Commit).  Otherwise, under Linux, the last-edited cell wouldn't commit its change.  This problem does not exist under MS Windows, and this workaround appears to have no negative effects under MS Windows.

I figure this is an easy enough bug fix, for someone that knows the mono-winforms source-code well.  Until then, this workaround can be used.
Comment 1 Steve 2012-06-02 09:45:14 UTC
Created attachment 2001 [details]
My patch for the problem

Here's my proposed patch to fix the problem.  It's currently under review on the mono-devel list.  But if you can't wait, or wish to test it yourself, here you go.
Comment 2 Thomas Goldstein 2012-06-17 18:23:44 UTC
Patch pushed (commit 508b0c06680caa89e8ef9a0d0cd6c05d3126a6ab), thanks.