DataGrid and Wheel on mouse

B

Bob Day

Using VS 2003, VB.net, msde...

I have a databound datagrid that works fine. The form also has several
combo boxes that determines what the datagrid displays.

When data is displayed, if you highlight a row, or click on a cell, and use
the mouse wheel to scroll down, it immediately gives focus to combobox tab
stop 1, scrolling down it's options. I would anticipate the wheel to simply
scroll down the datagrid (like hitting the down arrow on the scroll bar),
not swich to another control and scroll its options.

Any idea what is going on and how to prevent this?

Thanks!
Bob
 
S

Scot Rose [MSFT]

Hi Bob,

Do you have a small sample project that demonstrates this behavior that I could take a look at?


Scot Rose, MCSD
Microsoft Visual Basic Developer Support
Email : (e-mail address removed) <Remove word online. from address>

This posting is provided “AS IS”, with no warranties, and confers no rights.

Get Secure!
http://www.microsoft.com/security
http://www.microsoft.com/protect


--------------------
 
G

Guest

Got the same problem.

The Grid Control seems to 'Tab out' when you scroll down and the selected row scrolls out of view.
You get the same problem if you use the Vertical Scroll Bar.

There must be someway to switch this feature off?
Will post if I find a solution.

Dan.
 
G

Guest

Bob

Try setting the column style for each of your columns to Read Only

The issue seems to occur only on Read Only Datagrids

Hope this helps

Dan.
 
Y

Ying-Shen Yu[MSFT]

Hi Bob,

Try handling the OnScroll event set focus to the dataGrid, like :
private void dataGrid1_Scroll(object sender, System.EventArgs e)
{
dataGrid1.Focus();
}
Does it help to resolve your problem?
Please reply to this thread if you still have problem on it, thanks!

Best regards,

Ying-Shen Yu [MSFT]
Microsoft community Support
Get Secure! - www.microsoft.com/security

This posting is provided "AS IS" with no warranties and confers no rights.
This mail should not be replied directly, please remove the word "online"
before sending mail.
 
V

VB.NET Dev

I was experiencing the same problem and the fix from Ying-Shen Yu worked
like a charm!

Thanks!
 

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

Top