If DataGrid1.InvokeRequired Then
Dim mi2 As New MethodInvoker(AddressOf AddDataGridData)
DataGrid1.Invoke(mi2, Nothing)
Else
DataGrid1.TableStyles.Add(tsGridTableStyles)
End If
Private Sub AddDataGridData(ByVal tsGridTableStyles As DataGridTableStyle)
DataGrid1.TableStyles.Add(tsGridTableStyles)
End Sub
I am getting the following error on line two of the above code
Method ‘Private Sub AddDataGridData(tsGridTableStyles as System.Windows.Forms.DataGridTableStyle)’ does not have the same signature as delegate ‘Delegate Sub MethodInvoker()’
What should I do to fix it? And what am I doing wrong?
Dim mi2 As New MethodInvoker(AddressOf AddDataGridData)
DataGrid1.Invoke(mi2, Nothing)
Else
DataGrid1.TableStyles.Add(tsGridTableStyles)
End If
Private Sub AddDataGridData(ByVal tsGridTableStyles As DataGridTableStyle)
DataGrid1.TableStyles.Add(tsGridTableStyles)
End Sub
I am getting the following error on line two of the above code
Method ‘Private Sub AddDataGridData(tsGridTableStyles as System.Windows.Forms.DataGridTableStyle)’ does not have the same signature as delegate ‘Delegate Sub MethodInvoker()’
What should I do to fix it? And what am I doing wrong?