PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Framework Forms
DataGrid and Wheel on mouse
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Framework Forms
DataGrid and Wheel on mouse
![]() |
DataGrid and Wheel on mouse |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
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 |
|
|
|
#2 |
|
Guest
Posts: n/a
|
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 : scotr@online.microsoft.com <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 -------------------- >From: "Bob Day" <BobDay@TouchTalk.net> >Subject: DataGrid and Wheel on mouse >Date: Wed, 21 Jan 2004 15:19:54 -0500 >Lines: 17 >X-Priority: 3 >X-MSMail-Priority: Normal >X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 >X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 >Message-ID: <eZx8vvF4DHA.1596@TK2MSFTNGP10.phx.gbl> >Newsgroups: microsoft.public.dotnet.framework.windowsforms >NNTP-Posting-Host: dhcp065-029-073-074.indy.rr.com 65.29.73.74 >Path: cpmsftngxa07.phx.gbl!cpmsftngxa06.phx.gbl!cpmsftngxa09.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl >Xref: cpmsftngxa07.phx.gbl microsoft.public.dotnet.framework.windowsforms:60274 >X-Tomcat-NG: microsoft.public.dotnet.framework.windowsforms > >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 > > > |
|
|
|
#3 |
|
Guest
Posts: n/a
|
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. |
|
|
|
#4 |
|
Guest
Posts: n/a
|
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. |
|
|
|
#5 |
|
Guest
Posts: n/a
|
They are set to read only, all columns. Does not change the problem.
Bob Day "Dan [Spherion Technology Australia]" <anonymous@discussions.microsoft.com> wrote in message news:AD20D514-909C-4B91-A17D-58B173263152@microsoft.com... > 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. |
|
|
|
#6 |
|
Guest
Posts: n/a
|
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. |
|
|
|
#7 |
|
Guest
Posts: n/a
|
I was experiencing the same problem and the fix from Ying-Shen Yu worked
like a charm! Thanks! *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

