[Mono-bugs] [Bug 80794][Wis] New - Data binding does not work in Combobox

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sun Feb 11 17:00:58 EST 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=80794

--- shadow/80794	2007-02-11 17:00:58.000000000 -0500
+++ shadow/80794.tmp.25404	2007-02-11 17:00:58.000000000 -0500
@@ -0,0 +1,48 @@
+Bug#: 80794
+Product: Mono: Class Libraries
+Version: 1.1
+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: Data binding does not work in Combobox
+
+Observed: combobox contains Karu Elekter OÜ
+Expected: combobox should contain Tiskre Oja OÜ
+
+Code to reproduce:
+
+using System.Windows.Forms;
+using System.Data;
+
+static class Program {
+	static void Main() {
+		Application.Run(new Frm());
+	}
+}
+
+class Frm : Form {
+
+	public Frm() {
+		DataSet ds = new DataSet();
+		ds.ReadXml(@"c:\table.xml");
+		DataSet ds2 = new DataSet();
+		ds2.ReadXml(@"c:\lookup.xml");
+		ComboBox cb = new ComboBox();
+		cb.DataSource = ds2.Tables[0];
+		cb.DisplayMember = "nimi";
+		cb.ValueMember = "kood";
+		cb.DataBindings.Add("SelectedValue", ds.Tables
+[0], "klient");
+		Controls.Add(cb);
+	}
+}


More information about the mono-bugs mailing list