[Mono-bugs] [Bug 77345][Nor] New - DataGridTextBoxColumn doesn't instantiate DataGridTextBox until Edit()

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Tue Jan 24 12:13:35 EST 2006

Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by adamwood at xephi.co.uk.


--- shadow/77345	2006-01-24 12:13:35.000000000 -0500
+++ shadow/77345.tmp.18835	2006-01-24 12:13:35.000000000 -0500
@@ -0,0 +1,35 @@
+Bug#: 77345
+Product: Mono: Class Libraries
+Version: 1.0
+OS Details: Gentoo
+Status: NEW   
+Priority: Normal
+Component: Windows.Forms
+AssignedTo: peter at novonyx.com                            
+ReportedBy: AdamWood at Xephi.co.uk               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+Summary: DataGridTextBoxColumn doesn't instantiate DataGridTextBox until Edit()
+Description of Problem:  
+The System.Windows.Forms.DataGridTextBoxColumn contains a property TextBox  
+that gets the underlying TextBox. Under Windows .NET this property  
+can be accessed immediately once the Column is created, however under Mono  
+this field is only instantiated during the first call to  
+DataGridTextBoxColumn.Edit(). This breaks compatibility.  
+Sample code snippet:  
+DataGridTextBoxColumn col = new DataGridTextBoxColumn();  
+col.TextBox.MouseDown += new MouseEventHandler(TextBoxMouseDownHandler);  
+Under .NET the above code will call the handler as expected.  
+Under Mono the above code throws a Null Pointer Exception. I would think 
+creating an instance of the TextBox in the column constructor should fix 
+this rather than lazily instantiating on the first call to Edit().

More information about the mono-bugs mailing list