Solved

Mousewheel scroll  on datagridview

Posted on 2016-08-23
7
14 Views
Last Modified: 2016-08-28
Hello,

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

Cheers
0
Comment
Question by:RIAS
  • 4
  • 3
7 Comments
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 41766821
>>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?)
0
 

Author Comment

by:RIAS
ID: 41766824
It does scroll but first I have to select a row and then it scrolls .
0
 
LVL 44

Assisted Solution

by:AndyAinscow
AndyAinscow earned 500 total points
ID: 41766855
My obvious next suggestion is to select a row (eg. the first one) from code after you populate the gridview.
0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 

Author Comment

by:RIAS
ID: 41766862
Thanks Andy but is there any other way like mouse hoover ..
0
 

Accepted Solution

by:
RIAS earned 0 total points
ID: 41766878
Andy found the solution
Datagridview.Select
0
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 41766933
>>mouse hoover

LOL - That has given me a crazy mental picture
0
 

Author Closing Comment

by:RIAS
ID: 41773595
Found the solution and have posted the solution.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now