]> git.saurik.com Git - wxWidgets.git/commitdiff
fall back on text value if no long/double value could be retrieved from the cell
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 23 Feb 2000 16:15:46 +0000 (16:15 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 23 Feb 2000 16:15:46 +0000 (16:15 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6237 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/grid.cpp

index 5742da31c33fa81915fc9ae23032156c7e0bd4cd..6ee198034a54833cf5948f2365837fba114dd5da 100644 (file)
@@ -700,6 +700,7 @@ void wxGridCellNumberEditor::StartingKey(wxKeyEvent& event)
 
     event.Skip();
 }
+
 // ----------------------------------------------------------------------------
 // wxGridCellFloatEditor
 // ----------------------------------------------------------------------------
@@ -1100,7 +1101,10 @@ wxString wxGridCellNumberRenderer::GetString(wxGrid& grid, int row, int col)
     {
         text.Printf(_T("%ld"), table->GetValueAsLong(row, col));
     }
-    //else: leave the string empty or put 0 into it?
+    else
+    {
+        text = table->GetValue(row, col);
+    }
 
     return text;
 }
@@ -1158,7 +1162,10 @@ wxString wxGridCellFloatRenderer::GetString(wxGrid& grid, int row, int col)
 
         text.Printf(m_format, table->GetValueAsDouble(row, col));
     }
-    //else: leave the string empty or put 0 into it?
+    else
+    {
+        text = table->GetValue(row, col);
+    }
 
     return text;
 }