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)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor='Silver'");
e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor='green'");
}
}
You can reach on jcpvivek@gmail.com
ReplyDelete