Error al Cargar Datagridview
Publicado por Mynor (3 intervenciones) el 19/04/2021 00:40:55
Estimados buen día, pido Por Favor su apoyo para solucionar un problema que tengo en el siguiente código:
ERROR: "La cadena de entrada no tiene el formato correcto"
CLASE:
LLENA EL DATAGRIDVIEW Y LUEGO SE ENVIARA A UNA TABLA DE SQL:
GRACIAS A TODOS !!!!
ERROR: "La cadena de entrada no tiene el formato correcto"
CLASE:
1
2
3
4
5
6
Public Class Customer
Public Property SUBDEPTO As String
Public Property EXISTENCIA As Single
End Class
LLENA EL DATAGRIDVIEW Y LUEGO SE ENVIARA A UNA TABLA DE SQL:
1
2
3
4
5
6
7
8
9
10
If dt IsNot Nothing Then
Dim list As List(Of Customer= New List(Of Customer()
For i As Integer = 0 To dt.Rows.Count - 1
Dim Customer As Customer = New Customer()
Customer.SUBDEPTO = dt.Rows(i)("SUBDEPTO").ToString()
Customer.EXISTENCIA = Convert.ToSingle(dt.Rows(i)("EXISTENCIA").ToString()) 'acá genera error
list.Add(Customer)
Next
CustomerBindingSource.DataSource = list
End If
GRACIAS A TODOS !!!!
Valora esta pregunta


0