Combination of JavaScript, CSS and C# code provides the functionality to highlight the GridView Row onmouseover. You can define the alternate CSS classes for showing the rollover color effect on GridView Rows. First CSS class will change the Row color to show highlight effect onmouseover event of GridView row. Second CSS class will set back the original color of the GridView Row onmouseout event. In this Sample we have used JavaScript code to change the CSS class name of GridView Row Items by attaching onmouseover and onmouseout events to each Row Item.
JavaScript Events Used
1. OnMouseOver
2. OnMouseOut
C# foreach loop is also used here to loop over the each Row Item of GridView control.