+ // the test for empty strings ensures that we don't skip the value setting
+ // when "" is replaced by "0" or vice versa as "" numeric value is also 0.
+ if ( wxIsSameDouble(value, m_valueOld) && !text.empty() && !textOld.empty() )
+ return false; // nothing changed
+
+ wxGridTableBase * const table = grid->GetTable();
+
+ if ( table->CanSetValueAs(row, col, wxGRID_VALUE_FLOAT) )
+ table->SetValueAsDouble(row, col, value);
+ else
+ table->SetValue(row, col, text);
+
+ return true;