Tengo un backgroundworker para trabajar unos objetos y querys, pero llama a un delegado para escribir en un datagridview, pero cuando le añado 1 caracter al string que le paso al delegado este ya no escribe en el grid y entra el me.invokerequired, si le quito este caracter pasa al else. Desde aquí llamo al delegado
If jsonElemento.cantidad_errores <> 0 Then
If jsonErrores.Count = 0 Then
vector = fila("docentry").ToString + ";" + fila("tipo") + ";" + " " + "AQUI VA EL CARACTER QUE NECESITO PONER" + jsonElemento.cantidad_errores.ToString
gridError(vector)
Else
vector = fila("docentry").ToString + ";" + fila("tipo") + ";" + jsonErrores(0).mensaje_error.ToString + ";" + jsonElemento.cantidad_errores.ToString
gridError(vector)
End If
End If
Y este es el codigo del delegado
Public Sub gridError(argumentos As String)
If Me.InvokeRequired() Then
Me.Invoke(New Action(Of String)(AddressOf gridError), argumentos)
Else
vector = argumentos.Split(delimitadores, StringSplitOptions.None)
If vector.Count = 3 Then
DataErrores.Rows.Add(vector(0), vector(1), vector(2))
ElseIf vector.Count = 2 Then
DataErrores.Rows.Add(vector(0), " ", vector(1))
End If
End If
End Sub