Author: pedro
Date: 2007-03-07 12:18:33 -0500 (Wed, 07 Mar 2007)
New Revision: 73896

Modified:
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
   
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGridViewColumn.cs
Log:
2007-03-07  Pedro Mart?\195?\173nez Juli?\195?\161  <[EMAIL PROTECTED]>

        * DataGridViewColumn.cs: Fix HeaderText behaviour (Bug #80746).



Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2007-03-07 17:06:21 UTC (rev 73895)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2007-03-07 17:18:33 UTC (rev 73896)
@@ -1,5 +1,9 @@
 2007-03-07  Pedro Martínez Juliá  <[EMAIL PROTECTED]>
 
+       * DataGridViewColumn.cs: Fix HeaderText behaviour (Bug #80746).
+
+2007-03-07  Pedro Martínez Juliá  <[EMAIL PROTECTED]>
+
        * DataGridView.cs: Change DataSource will clear column and row
        lists. Call Invalidate() to reflect DataSource change.
 

Modified: 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGridViewColumn.cs
===================================================================
--- 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGridViewColumn.cs
    2007-03-07 17:06:21 UTC (rev 73895)
+++ 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGridViewColumn.cs
    2007-03-07 17:18:33 UTC (rev 73896)
@@ -47,7 +47,6 @@
                private float fillWeight;
                private bool frozen;
                private DataGridViewColumnHeaderCell headerCell;
-               private string headerText = "";
                private DataGridViewAutoSizeColumnMode inheritedAutoSizeMode;
                private bool isDataBound;
                private int minimumWidth = 5;
@@ -222,8 +221,13 @@
 
                [Localizable (true)]
                public string HeaderText {
-                       get { return headerText; }
-                       set { headerText = value; }
+                       get {
+                               if (headerCell.Value == null) {
+                                       return String.Empty;
+                               }
+                               return (string) headerCell.Value;
+                       }
+                       set { headerCell.Value = value; }
                }
 
                [Browsable (false)]

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to