16,717
社区成员
发帖
与我相关
我的任务
分享
Private Sub DataGridView1_CurrentCellChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DataGridView1.CurrentCellChanged
For Each R As DataGridViewRow In DataGridView2.SelectedRows
R.Selected = False
Next
DataGridView2.Rows(DataGridView1.CurrentRow.Cells(0).RowIndex).Selected = True
End Sub
Private Sub DataGridView1_Scroll(ByVal sender As Object, ByVal e As System.Windows.Forms.ScrollEventArgs) Handles DataGridView1.Scroll
DataGridView2.FirstDisplayedScrollingRowIndex = DataGridView1.FirstDisplayedScrollingRowIndex
End Sub