Hola les escribo para ver si me puden echar la mano para entender el porque
cuando intento escibir muy rapidamente valores en un datagridView esta manda
un error
de antemano les doy las gracias por algun consejo.
Public Class Form1
Private tbl As New DataTable
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
tbl.Columns.Add("Numero", System.Type.GetType("System.Int32"))
tbl.Columns.Add("Fecha", System.Type.GetType("System.String"))
Me.DataGridView1.DataSource = tbl
Dim rw As DataRow = tbl.NewRow
rw("Numero") = 1
rw("Fecha") = Now
tbl.Rows.Add(rw)
Dim hl As New Threading.Thread(AddressOf hilo)
hl.Start()
End Sub
Private Sub hilo()
While True
'System.Threading.Thread.Sleep(1000)
Dim rw() As DataRow = tbl.Select("Numero = 1")
rw(0)("Fecha") = Now
End While
End Sub
End Class
Leer las respuestas