* DataGridViewCheckBoxCell.cs: Fix to make it work. Wrong value was
casted to CheckState.
svn path=/trunk/mcs/; revision=120974
+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
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);