Scroll in Datagrid with mousewheel

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi folks.
I have a problem with a Datatgrid.
When my User selects a row in the Datagrid he is able to scroll through the
Grid by using the Mousewheel.
The prob is that when the selectedrow is scrolled out of the grid u cannot
use the mousewheel to scroll anymore.

Does anyone know zhis prob and maybe has a solution?
 
the solution :

AddHandler Me.dataGrid1.MouseWheel, addressof dataGrid1_MouseWheel

Private Sub dataGrid1_MouseWheel(ByVal sender As Object, ByVal e As
MouseEventArgs)

Me.dataGrid1.Select()

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top