Quantcast
Channel: Windows Forms Data Controls and Databinding forum
Viewing all articles
Browse latest Browse all 2535

Highlight row in DataGridView when mouse hovers over a row

$
0
0

I've seen many third-party components do this.

In a DataGridView, how do I programmatically (using C#) change the row's background to yellow, but only the row the mouse is hovering over.

I know I need to use the HitTestInfo property of the DataGridView but can't seem to get it to work right. Remember, I want the row's background to change. I don't want the row to be "selected".

Thanks in advance

Ray


Viewing all articles
Browse latest Browse all 2535

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>