2008-12-08 Ivan N. Zlatev <contact@i-nz.net>
authorIvan Zlatev <ivan@ivanz.com>
Mon, 8 Dec 2008 05:25:43 +0000 (05:25 -0000)
committerIvan Zlatev <ivan@ivanz.com>
Mon, 8 Dec 2008 05:25:43 +0000 (05:25 -0000)
* DataGridViewCheckBoxCell.cs: Fix to make it work. Wrong value was
casted to CheckState.

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

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

index 0deff949da518768f91884f8e3c052a14477c7c4..d1a1c4008e6e18637ca58463b90a0892fa8ff922 100644 (file)
@@ -1,3 +1,8 @@
+2008-12-08  Ivan N. Zlatev  <contact@i-nz.net>
+
+       * DataGridViewCheckBoxCell.cs: Fix to make it work. Wrong value was 
+       casted to CheckState causing InvalidCastExceptions.
+
 2008-12-08  Ivan N. Zlatev  <contact@i-nz.net>
 
        * DataGridView.cs: Fix the DataGridViewEditMode.EditOnEnter behavior 
index 7b64b73b4a7bada4db2c9ea8aa02895c7973e44f..8a15579e181a6dd08e2909c2b40a53697fe957a2 100644 (file)
@@ -386,7 +386,7 @@ namespace System.Windows.Forms {
 
                        if ((CheckState)value == CheckState.Unchecked)
                                state = (CheckBoxState)check_state;
-                       else if ((CheckState)editingCellFormattedValue == CheckState.Checked)
+                       else if ((CheckState)value == CheckState.Checked)
                                state = (CheckBoxState)((int)check_state + 4);
                        else if (threeState)
                                state = (CheckBoxState)((int)check_state + 8);