By using this Article you can learn how to change BackGround Color of a Row in Gridview when user moves mouse on a particular selecting Row.
First Drag and Drop one Gridview Control on a webpage.After Retriving the data in a gridvew select your gridview and choose Events.In Events DoubleClik on RowDataBound.
after DoubleCliking on RowDataBound Event you will get a code in .aspx.cs as Below:
protected
void GridView2_RowDataBound(object sender, GridViewRowEventArgs e){
}
In Above RowDataBound event add onmouseover and onmouseout Events.The Color can be set by using this.style.backgroundcolor='red'
if
(e.Row.RowType == DataControlRowType.DataRow){
e.Row.Attributes.Add(
"onmouseover", "this.style.backgroundColor='Silver'");e.Row.Attributes.Add(
"onmouseout", "this.style.backgroundColor='green'");}
when you press F5 Button the OutPut is as Follows

when the user Moves Mouseover or MouseOut on Gridview the Particular selecting Row on gridview changes the BackGround Color .Simple output Image is Below.

The Complete coding is below:
<
asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" BorderColor="#400000"DataKeyNames="ID" DataSourceID="SqlDataSource1" OnRowDataBound="GridView2_RowDataBound"Style="z-index: 102; left: 133px; position: absolute; top: 154px" Height="219px" Width="196px"><Columns><asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False" ReadOnly="True"SortExpression="ID" /><asp:BoundField DataField="empname" HeaderText="empname" SortExpression="empname" /><asp:BoundField DataField="salary" HeaderText="salary" SortExpression="salary" /></Columns><HeaderStyle BackColor="Aqua" ForeColor="Black" /></asp:GridView>
in .aspx.cs
protected
void GridView2_RowDataBound(object sender, GridViewRowEventArgs e){
if (e.Row.RowType == DataControlRowType.DataRow) {
e.Row.Attributes.Add(
"onmouseover", "this.style.backgroundColor='Silver'"); e.Row.Attributes.Add(
"onmouseout", "this.style.backgroundColor='green'"); }
}