Selaa lähdekoodia

颗粒列表数字转为double型

cxs 1 vuosi sitten
vanhempi
commit
a3756f5ba8
1 muutettua tiedostoa jossa 10 lisäystä ja 1 poistoa
  1. 10 1
      OTSIncAReportApp/1-UI/Control_Grids/ParticlesGridDevidePage.cs

+ 10 - 1
OTSIncAReportApp/1-UI/Control_Grids/ParticlesGridDevidePage.cs

@@ -855,7 +855,16 @@ namespace OTSIncAReportGrids
                             }
                             else
                             {
-                                dgV_ParticlesDevidePage.Rows[add_rowindex].Cells[k].Value = particles.Rows[i][enl.Current.Key];
+                                double val = 0;
+                                if(double.TryParse(Convert.ToString(particles.Rows[i][enl.Current.Key]),out val))
+                                {
+                                    dgV_ParticlesDevidePage.Rows[add_rowindex].Cells[k].Value = val;
+                                }
+                                else
+                                {
+                                    dgV_ParticlesDevidePage.Rows[add_rowindex].Cells[k].Value = particles.Rows[i][enl.Current.Key];
+                                }
+                                
                             }
                         }
                         if (enl.Current.Key == "TypeName")