Ticket Q372810
Visible to All Users

How to implement the hot-track functionality for grid rows and remove hot tracking when the cursor is not over a row

created 12 years ago

[Posted by isaac khazi]
[ Question relates to the A998 KB article]
Hi,
The solution works great however, how do I clear the selection/Hottrack when the cursor is not over any row? For example if the users moves focus of the cursor away from the gridcontrol.

Answers approved by DevExpress Support

created 12 years ago (modified 12 years ago)

Hello,
I have created a simple project according to the How to implement hot-tracking for grid rows article (see the attachment), and it works correctly. The only difference is that when I move the cursor outside the grid bounds, the Hot-Track line does not disappear. To resolve this issue, handle the GridView.MouseLeave event in the following manner:

Code
Private Sub gridView1_MouseLeave(ByVal sender As Object, ByVal e As EventArgs) HotTrackRow = DevExpress.XtraGrid.GridControl.InvalidRowHandle End Sub

If I understand your task incorrectly, please describe your final goal in greater detail.
I hope to receive your response soon.

    Comments (2)

      Hi Andrew,
      that's exactly what I was looking for.
      thanks,
      Isaac

      Andrew Ser (DevExpress Support) 12 years ago

        You're welcome, Isaac. I'm happy to hear that my assistance was helpful to you.

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.