[Mono-bugs] [Bug 82573][Wis] New - Bindingsource causes error

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Fri Aug 24 11:17:25 EDT 2007


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 kobruleht2 at hot.ee.

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

--- shadow/82573	2007-08-24 11:17:25.000000000 -0400
+++ shadow/82573.tmp.18879	2007-08-24 11:17:25.000000000 -0400
@@ -0,0 +1,72 @@
+Bug#: 82573
+Product: Mono: Class Libraries
+Version: 1.0
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: Windows.Forms
+AssignedTo: toshok at ximian.com                            
+ReportedBy: kobruleht2 at hot.ee               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Bindingsource causes error
+
+To reproduce, run the code.
+
+Observed:
+
+error requested feature is not implemented.
+
+Code:
+
+using System.Windows.Forms;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System;
+
+class TestApplication {
+	static void Main() {
+		try {
+			Application.Run(new TestForm());
+		}
+		catch (Exception e) {
+			MessageBox.Show(e.ToString());
+		}
+
+	}
+}
+
+class TestForm : Form {
+
+	DataGridView DataGridView = new DataGridView();
+
+	public TestForm() {
+		Controls.Add(DataGridView);
+
+		BindingSource BindingSource = new BindingSource();
+		IList<Customer> list = new Customer[0];
+		BindingList<Customer> bindingList = new 
+BindingList<Customer>(list);
+		BindingSource.DataSource = bindingList;
+
+		BindingSource.AddingNew += delegate(object sender, 
+AddingNewEventArgs e) {
+			e.NewObject = new Customer();
+		};
+
+		DataGridView.DataSource = BindingSource;
+	}
+}
+
+class Customer {
+	string name;
+	public string Name {
+		get { return name; }
+		set { name = value; }
+	}
+}


More information about the mono-bugs mailing list