Author: mkestner
Date: 2006-08-10 16:50:15 -0400 (Thu, 10 Aug 2006)
New Revision: 63625
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListControl.cs
Log:
2006-08-10 Mike Kestner <[EMAIL PROTECTED]>
* ListControl.cs: allow null for DataSource. Clear DisplayMember
when setting to null per msdn docs. Fixes #78854.
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2006-08-10 20:37:09 UTC (rev 63624)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2006-08-10 20:50:15 UTC (rev 63625)
@@ -1,3 +1,8 @@
+2006-08-10 Mike Kestner <[EMAIL PROTECTED]>
+
+ * ListControl.cs: allow null for DataSource. Clear DisplayMember
+ when setting to null per msdn docs. Fixes #78854.
+
2006-08-10 Chris Toshok <[EMAIL PROTECTED]>
* Menu.cs, MainMenu.cs, MenuAPI.cs: get rid of most of the
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListControl.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListControl.cs
2006-08-10 20:37:09 UTC (rev 63624)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListControl.cs
2006-08-10 20:50:15 UTC (rev 63625)
@@ -75,13 +75,15 @@
public object DataSource {
get { return data_source; }
set {
- if (!(value is IList || value is IListSource))
+ if (data_source == value)
+ return;
+
+ if (value == null)
+ display_member = String.Empty;
+ else if (!(value is IList || value is
IListSource))
throw new ArgumentException ("Complex
DataBinding accepts as a data source " +
"either an IList or an
IListSource");
- if (data_source == value)
- return;
-
data_source = value;
ConnectToDataSource ();
OnDataSourceChanged (EventArgs.Empty);
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches