424,303 Members | 1,366 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,303 IT Pros & Developers. It's quick & easy.

changing mouse cursor over certain DataGrid columns

P: n/a
How can I customize DataGrid so that when the mouse hovers over certain
columns the cursor changes to the Cursors.Hand cusror? I was unable to use
the MouseEnter/MouseLeave events on DataGrid itself because those events do
not use the MouseEventArgs, so I can't get the X Y position to determine if
the cursor should change for that column
Nov 16 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
MrNobody,

Use the MouseMove event handler. This will give you the X and Y
coordinates of the mouse in relation to the grid.. Once you have those, you
can call HitTest to determine which cell it is over. With that information,
you can set the cursor.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"MrNobody" <Mr******@discussions.microsoft.com> wrote in message
news:95**********************************@microsof t.com...
How can I customize DataGrid so that when the mouse hovers over certain
columns the cursor changes to the Cursors.Hand cusror? I was unable to use
the MouseEnter/MouseLeave events on DataGrid itself because those events
do
not use the MouseEventArgs, so I can't get the X Y position to determine
if
the cursor should change for that column

Nov 16 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.