Mousewheel scroll on datagridview


How can I add a scroll on a datagridview with mouse  wheel.

I have nearly 10 datagridviews so
  AddHandler DirectCast(ctrl,datagridview).KeyDown, AddressOf  example

Who is Participating?

Improve company productivity with a Business Account.Sign Up

RIASConnect With a Mentor Author Commented:
Andy found the solution
AndyAinscowFreelance programmer / ConsultantCommented:
>>How can I add a scroll on a datagridview with mouse  wheel.

Do you mean the view doesn't scroll already when you use the mouse wheel?  (Where exactly is the mouse cursor over when you try?)
RIASAuthor Commented:
It does scroll but first I have to select a row and then it scrolls .
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

AndyAinscowConnect With a Mentor Freelance programmer / ConsultantCommented:
My obvious next suggestion is to select a row (eg. the first one) from code after you populate the gridview.
RIASAuthor Commented:
Thanks Andy but is there any other way like mouse hoover ..
AndyAinscowFreelance programmer / ConsultantCommented:
>>mouse hoover

LOL - That has given me a crazy mental picture
RIASAuthor Commented:
Found the solution and have posted the solution.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.