Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Datagrid lost focus if mouse wheel Scrolled past Top or Bottom

Status
Not open for further replies.

Woofer2

Programmer
Oct 30, 2003
6
Hello expert,

I have a DataGrid Mouse Scroll Problem:

I can scroll from Start to End using the vertical scrollbars but when scrolling with the mouse and the selected row is scrolled past the top or bottom of viewing area the DataGrid looses focus (stops scrolling).

Only found similar instance on thread796-553317. Making DataGrid read only did not work and can’t figure out why it would. I have searched the Web using every possible word combination with no luck.

This is not a linked Database, it is made in the program using text strings.

Thanks,
 
What was the oversight that caused this? Im am having the same problem.
 
Try to add this code :

Private Sub DataGrid1_MouseWheel(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles DataGrid1.MouseWheel

DataGrid1.Focus()

End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top