Murray Brown
asked on
VB.net DataGridView scrolling error
Hi
I am using the code below to scroll four DataGridViews when my first DataGridView is scrolled. When I play around with it and click in the first DataGridView I get the error
"Specified argument was out of the range of valid values. Parameter name value"
Try
Me.DataGridView1.FirstDisp layedScrol lingRowInd ex = Me.DataGridView5.FirstDisp layedScrol lingRowInd ex
Me.DataGridView1.Horizonta lScrolling Offset = Me.DataGridView5.Horizonta lScrolling Offset
Me.DataGridView2.FirstDisp layedScrol lingRowInd ex = Me.DataGridView5.FirstDisp layedScrol lingRowInd ex
Me.DataGridView2.Horizonta lScrolling Offset = Me.DataGridView5.Horizonta lScrolling Offset
Me.DataGridView3.FirstDisp layedScrol lingRowInd ex = Me.DataGridView5.FirstDisp layedScrol lingRowInd ex
Me.DataGridView3.Horizonta lScrolling Offset = Me.DataGridView5.Horizonta lScrolling Offset
Me.DataGridView4.FirstDisp layedScrol lingRowInd ex = Me.DataGridView5.FirstDisp layedScrol lingRowInd ex
Me.DataGridView4.Horizonta lScrolling Offset = Me.DataGridView5.Horizonta lScrolling Offset
Catch ex As Exception
MsgBox("Scrolling error " & ex.Message)
End Try
I am using the code below to scroll four DataGridViews when my first DataGridView is scrolled. When I play around with it and click in the first DataGridView I get the error
"Specified argument was out of the range of valid values. Parameter name value"
Try
Me.DataGridView1.FirstDisp
Me.DataGridView1.Horizonta
Me.DataGridView2.FirstDisp
Me.DataGridView2.Horizonta
Me.DataGridView3.FirstDisp
Me.DataGridView3.Horizonta
Me.DataGridView4.FirstDisp
Me.DataGridView4.Horizonta
Catch ex As Exception
MsgBox("Scrolling error " & ex.Message)
End Try
And where do you have that code?
ASKER
Private Sub DataGridView1_Scroll(sende r As Object, e As System.Windows.Forms.Scrol lEventArgs ) Handles DataGridView1.Scroll
End Sub
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks