Bug 5419 - DataGridView EditingControlShowing not firing
Summary: DataGridView EditingControlShowing not firing
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:53 UTC by Steve
Modified: 2012-06-21 19:47 UTC (History)
2 users (show)

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

Patch to fix problem (5.08 KB, patch)
2012-06-02 09:47 UTC, Steve
Improved patch (2.27 KB, patch)
2012-06-09 14:13 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:53:51 UTC
The EditingControlShowing event does not appear to be firing in mono-winforms.

This bug was apparently noticed back in July of 2009; I found that report at http://mono.1490590.n4.nabble.com/DataGridView-EditingControlEvent-td1542513.html .  Apparently it was never officially reported.
Comment 1 Steve 2012-06-02 09:47:36 UTC
Created attachment 2002 [details]
Patch to fix 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.

I had to split a DataGridCell.StyleEditingControl() method from DataGridCell.InitializeEditingControl(), to fix another problem I noticed: under .NET, a ComboBox's contents would be initialized at the time the EditingControlShowing event was posted.
Comment 2 Steve 2012-06-09 14:13:44 UTC
Created attachment 2035 [details]
Improved patch

My last patch was overly elaborate & inadvertently modified the public API.  Here's a better one.  This patch is under review on the mono-devel list.
Comment 3 Thomas Goldstein 2012-06-10 10:10:52 UTC
Patch committed (f9bea537f1ac41753f2204b8528a6292bb547111). Thanks!