Maybe a litle late, but i found a workaround for scrolling in a datarepeater without getting confused by the information in the form messed up by the scrollbar actions.
Make sure that in the datarepeater1_drawitem handler the contents etc of the controls are set.
The following code will work for every form with a datarepeater with a strange scroll behaviour. Place thefollowing lines in the code of the form:
(regards, Frank)
Private Sub DataRepeater1_Scroll(ByVal sender As Object, ByVal e As System.Windows.Forms.ScrollEventArgs) Handles DataRepeater1.Scroll
'the relative position of the datarepeater.currentitemindex is calculated
If DataRepeater1.ItemCount > 0 Then
Dim j As Int32 = 0 'calculated index for the itemindex
Dim i As Int32 = 0 'start index for looping through the datarepeater index
Dim s As Int16 = 0 'direction for the step in the for next
j = _
Math.Round(DataRepeater1.VerticalScroll.Value / _
(DataRepeater1.VerticalScroll.Maximum - _
DataRepeater1.VerticalScroll.LargeChange) * _
DataRepeater1.ItemCount, 0) _
- 1
'To make sure that j reaches a valid currentitemindex
If j < 0 Then j = 0
If j > DataRepeater1.ItemCount - 1 Then j = DataRepeater1.ItemCount - 1
'loop trough all the datarepeater rows
'from the current itemindex position to the calculated position
'in order to raise the DrawItem event for each row to
'make sure the datarepeater cunrrent controls are propperly filled
If j < DataRepeater1.CurrentItemIndex Then
s = -1
For i = DataRepeater1.CurrentItemIndex To j Step s
DataRepeater1.CurrentItemIndex = i
Next i
Else
s = 1
End If
For i = DataRepeater1.CurrentItemIndex To j Step s
DataRepeater1.CurrentItemIndex = i
Next i
End If
End Sub