[Mono-bugs] [Bug 80210][Blo] Changed - NRE Setting PropertyGrid.SelectedControl to a DataGrid

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sat Dec 9 20:37:05 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 monkey at jpobst.com.

http://bugzilla.ximian.com/show_bug.cgi?id=80210

--- shadow/80210	2006-12-09 19:25:21.000000000 -0500
+++ shadow/80210.tmp.24024	2006-12-09 20:37:05.000000000 -0500
@@ -1,23 +1,23 @@
 Bug#: 80210
 Product: Mono: Class Libraries
 Version: 1.1
-OS: 
+OS: unknown
 OS Details: 
 Status: NEW   
 Resolution: 
-Severity: 
-Priority: Wishlist
+Severity: Unknown
+Priority: Blocker
 Component: Windows.Forms
 AssignedTo: toshok at ximian.com                            
 ReportedBy: kobruleht2 at hot.ee               
 QAContact: mono-bugs at ximian.com
 TargetMilestone: ---
 URL: 
 Cc: 
-Summary: DataGrid as PropertyGrid SelectedControl not possible
+Summary: NRE Setting PropertyGrid.SelectedControl to a DataGrid
 
 To reproduce:
 
 Run the code in MONO 1.2 .NET 2.0 profile under Windows XP
 
 Observed:
@@ -29,6 +29,57 @@
 Form with propery grid must be shown
 
 ------- Additional Comments From kobruleht2 at hot.ee  2006-12-09 19:25 -------
 Created an attachment (id=18256)
 code to reproduce issue
 
+
+------- Additional Comments From monkey at jpobst.com  2006-12-09 20:37 -------
+The attached file does not have a DataGrid anywhere in the code.  I
+think you mean this:
+
+using System.Windows.Forms;
+
+class TestForm : Form
+{
+	static void Main ()
+	{
+		Application.Run (new TestForm ());
+	}
+
+	public TestForm ()
+	{
+		PropertyGrid p = new PropertyGrid ();
+		p.SelectedObject = new DataGrid ();
+	}
+}
+
+which results in the following NRE:
+
+Unhandled Exception: System.NullReferenceException: Object reference
+not set to an instance of an object
+
+  at System.ComponentModel.PropertyDescriptor.get_Converter ()
+[0x0005b] in
+C:\cygwin\tmp\scratch\mono-1.2.2\mcs\class\System\System.ComponentModel\PropertyDescriptor.cs:70
+
+  at System.Windows.Forms.PropertyGrid.PopulateGridItemsFromProperties
+(System.Object[] objs, System.Collections.ArrayList properties,
+System.Windows.Forms.GridItemCollection grid_item_coll, Boolean
+recurse, System.Windows.Forms.GridItem parent_grid_item) [0x00000] 
+  at System.Windows.Forms.PropertyGrid.PopulateMergedGridItems
+(System.Object[] objs, System.Windows.Forms.GridItemCollection
+grid_item_coll, Boolean recurse, System.Windows.Forms.GridItem
+parent_grid_item) [0x00000] 
+  at System.Windows.Forms.PropertyGrid.ReflectObjects () [0x00000] 
+  at System.Windows.Forms.PropertyGrid.set_SelectedObjects
+(System.Object[] value) [0x00000] 
+  at System.Windows.Forms.PropertyGrid.set_SelectedObject
+(System.Object value) [0x00000] 
+  at (wrapper remoting-invoke-with-check)
+System.Windows.Forms.PropertyGrid:set_SelectedObject (object)
+  at TestForm..ctor () [0x00000] 
+  at (wrapper remoting-invoke-with-check) TestForm:.ctor ()
+  at TestForm.Main () [0x00000]
+
+Also updated summary to match.  If this is not your issue, I apologize
+and please correct me.


More information about the mono-bugs mailing list