Edit: Changed the question.
Is there a way to add Rows to Datagridview without Freezing UI?
I tried:
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim t As New Threading.Thread(AddressOf CreateRows)
t.IsBackground = True
t.Start()
End Sub
Private Sub CreateRows()
If DataGridView1.InvokeRequired Then
DataGridView1.Invoke(New MethodInvoker(AddressOf CreateRows))
Else
For x = 0 To 25000
DataGridView1.Rows.Add(x)
Next
End If
End Sub