https://bugzilla.novell.com/show_bug.cgi?id=664833
https://bugzilla.novell.com/show_bug.cgi?id=664833#c0 Summary: Setting BindingSource.DataMember then DataSource causes DataMember to be nullified. Classification: Mono Product: Mono: Class Libraries Version: 2.6.x Platform: x86 OS/Version: Windows 7 Status: NEW Severity: Normal Priority: P5 - None Component: Windows.Forms AssignedTo: [email protected] ReportedBy: [email protected] QAContact: [email protected] Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/532.5 (KHTML, like Gecko) Chrome/4.1.249.1036 Safari/532.5 When setting BindingSource.DataMember then BindingSource.DataSource in that order, causes DataMember to be nullified. Reproducible: Always Steps to Reproduce: 1. Create a BindingSource. 2. Set BindingSource.DataMember to a value. 3. Set BindingSource.DataSource to a value. Actual Results: DataMember becomes null after DataSource is set. Expected Results: DataMember should remain the same when DataSource is set. This looks like a simple coding error, the changes below fix. Code modified in BindingSource.DataSource: [DefaultValue (null)] public object DataSource { get { return datasource; } set { if (datasource != value) { if (/*datasource*/ value == null) // this line changed; value should be checked for null, not datasource! datamember = String.Empty; -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. You are the assignee for the bug. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
