Ako Musha

Ako Musha

  • NA
  • 28
  • 12.2k

How to convert values in Datagridview from String to Double?

Oct 25 2018 1:10 PM
I have a calculated column in datagridview when I am trying to use the data from that column to calculate another parameter, I am getting an error as "Converting from string to Double is not valid" 
 
How can I convert the values to double? Thanks so much for your help!
 
Here is what I was trying to do, but does not do anything! 
 
   
  1. Convert.ToDouble (Data1.Rows(i).Value.Cells(10).Value)  
 
and also tryied this command as well, not working...
 
    
  1. Dim S As Double = 0   
  2.     Double.TryParse(Data1.Rows(i).Cells(10).Value, S)   
 

Answers (2)