用
Private Sub dw_i0102_Scroll(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ScrollEventArgs) Handles dw_i0102.Scroll
If (e.ScrollOrientation = ScrollOrientation.VerticalScroll) Then
If Me.m_scrollByEvent = False Then
Dim gcMultiRow As ExSMultiRow = DirectCast(sender, ExSMultiRow)
Dim scrollTarget As ExSMultiRow = Me.dw_02
If Not gcMultiRow Is Nothing Then
Dim newPos As CellPosition = New CellPosition(e.NewValue, scrollTarget.CurrentCellPosition.CellIndex)
Me.m_scrollByEvent = True
scrollTarget.FirstDisplayedCellPosition = newPos
End If
Else
Me.m_scrollByEvent = False
End If
End If
End Sub 效果不行 |