O
old_School
Guest
I have a background worker and I need to populate my datagridview after it finishes or during processing prefered. Because its on a separate thread, I get cross thread issue. So Im trying to populate a datatable by adding rows to it from another data table that runs in the background worker. Its telling me I cant add a row to my data table. Not sure whats wrong. I'm sure its simple
If (_Data.Rows.Count > 0) Then
Dim value As String = _Data.Rows(0).ItemArray(0).ToString()
If Not value = String.Empty Then
Dim row As New DataRow = _Data.Rows(0)
_Proofs.Rows.Add(row)
'dgvOutPut.Rows.Add(row)
passed = True
Else
'Prioritize Proof
sql = query.Prioritize_Proof_By_FileID(file_id)
datahelper.Execute_NonQuery_SQL(sql)
sql = query.Get_Proof_By_FileID(file_id)
End If
Get error: Severity Code Description Project File Line Suppression State
Error BC30517 Overload resolution failed because no 'New' is accessible. Vision_GMC_Utilities_vb C:\Users\mhomes\source\repos\Vision_GMC_Utilities\Vision_GMC_Utilities_vb\frmBuildDataOutput.vb 84 Active
Dim row As New DataRow = _Data.Rows(0)
Continue reading...
If (_Data.Rows.Count > 0) Then
Dim value As String = _Data.Rows(0).ItemArray(0).ToString()
If Not value = String.Empty Then
Dim row As New DataRow = _Data.Rows(0)
_Proofs.Rows.Add(row)
'dgvOutPut.Rows.Add(row)
passed = True
Else
'Prioritize Proof
sql = query.Prioritize_Proof_By_FileID(file_id)
datahelper.Execute_NonQuery_SQL(sql)
sql = query.Get_Proof_By_FileID(file_id)
End If
Get error: Severity Code Description Project File Line Suppression State
Error BC30517 Overload resolution failed because no 'New' is accessible. Vision_GMC_Utilities_vb C:\Users\mhomes\source\repos\Vision_GMC_Utilities\Vision_GMC_Utilities_vb\frmBuildDataOutput.vb 84 Active
Dim row As New DataRow = _Data.Rows(0)
Continue reading...