2008-07-02 Jonathan Pobst <monkey@jpobst.com>
authorJonathan Pobst <monkey@jpobst.com>
Wed, 2 Jul 2008 14:55:32 +0000 (14:55 -0000)
committerJonathan Pobst <monkey@jpobst.com>
Wed, 2 Jul 2008 14:55:32 +0000 (14:55 -0000)
* DataGridView.cs: Fix a crash when sorting by column headers,
mentioned in bug #404841.  Remove some dead switch cases.

svn path=/trunk/mcs/; revision=107064

mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGridView.cs

index e649681f9c9504b15af0822b00bbadfa21eef268..487b653bec283cfec32d9f031943f4ff8c3972f5 100644 (file)
@@ -1,3 +1,8 @@
+2008-07-02  Jonathan Pobst  <monkey@jpobst.com>
+
+       * DataGridView.cs: Fix a crash when sorting by column headers, 
+       mentioned in bug #404841.  Remove some dead switch cases.
+
 2008-07-01  Carlos Alberto Cortez <calberto.cortez@gmail.com>
 
        * ComboBox.cs:
index 76c0d65dd81565343e3a5e3d9c89ee009e6e2419..a6b5d44cd64c1b33771ffc9ac6aa3cfb7178ac96 100644 (file)
@@ -2810,8 +2810,9 @@ namespace System.Windows.Forms {
                                throw new ArgumentNullException ("dataGridViewColumn");
                        if (dataGridViewColumn.DataGridView != this)
                                throw new ArgumentException ("dataGridViewColumn");
-                       if (DataSource != null && !dataGridViewColumn.IsDataBound)
-                               throw new ArgumentException ("dataGridViewColumn");
+                       // XXX: This is thrown too much, disable for now..
+                       //if (DataSource != null && !dataGridViewColumn.IsDataBound)
+                       //        throw new ArgumentException ("dataGridViewColumn");
                        if (VirtualMode && !dataGridViewColumn.IsDataBound)
                                throw new InvalidOperationException ();
 
@@ -4713,9 +4714,6 @@ namespace System.Windows.Forms {
                                case Keys.Space:
                                        return ProcessSpaceKey (e.KeyData);
                                case Keys.Tab:
-                               case Keys.Shift | Keys.Tab:
-                               case Keys.Control | Keys.Tab:
-                               case Keys.Control | Keys.Shift | Keys.Tab:
                                        return ProcessTabKey (e.KeyData);
                                case Keys.Up:
                                        return ProcessUpKey (e.KeyData);