我正在尝试为每个出现在网格上的单个客户选择 DataGrid (gridActivePlayers) 的整个行。这是我的方法。我在使用“For Each”循环时遇到问题:
Private Sub CustomerBindingSource_PositionChanged(sender As Object, e As EventArgs) Handles CustomerBindingSource.PositionChanged
Dim drvCustomer As DataRowView = CType(Me.CustomerBindingSource.Current, DataRowView)
Dim selCustomer As Integer = drvCustomer.Item("CustomerID")
ActivePlayersBindingSource.Position = Me.ActivePlayersBindingSource.Find("CustomerID", selCustomer)
' Here is what I need to implement
For Each
MsgBox(1)
Next
End Sub