[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.
How to implement the hot-track functionality for grid rows and remove hot tracking when the cursor is not over a row
Answers approved by DevExpress Support
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:
CodePrivate 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.