PC Review Forums Newsgroups Microsoft DotNet Microsoft Dot NET Framework Forms DataGrid and Wheel on mouse

Reply

DataGrid and Wheel on mouse

 
Thread Tools Rate Thread
Old 21-01-2004, 08:19 PM   #1
Bob Day
Guest
 
Posts: n/a
Default DataGrid and Wheel on mouse


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


  Reply With Quote
Old 22-01-2004, 06:52 PM   #2
Scot Rose [MSFT]
Guest
 
Posts: n/a
Default RE: DataGrid and Wheel on mouse

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
>
>
>



  Reply With Quote
Old 04-02-2004, 12:41 AM   #3
=?Utf-8?B?RGFuIFtTcGhlcmlvbiBUZWNobm9sb2d5IEF1c3Ry
Guest
 
Posts: n/a
Default RE: DataGrid and Wheel on mouse

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.
  Reply With Quote
Old 10-02-2004, 01:36 AM   #4
=?Utf-8?B?RGFuIFtTcGhlcmlvbiBUZWNobm9sb2d5IEF1c3Ry
Guest
 
Posts: n/a
Default RE: DataGrid and Wheel on mouse

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.
  Reply With Quote
Old 08-03-2004, 03:40 PM   #5
Bob Day
Guest
 
Posts: n/a
Default Re: DataGrid and Wheel on mouse 2

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.



  Reply With Quote
Old 09-03-2004, 01:39 AM   #6
Ying-Shen Yu[MSFT]
Guest
 
Posts: n/a
Default Re: DataGrid and Wheel on mouse 2

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.

  Reply With Quote
Old 13-03-2004, 04:38 PM   #7
VB.NET Dev
Guest
 
Posts: n/a
Default Re: DataGrid and Wheel on mouse 2

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!
  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off