protected void gvNews_OnRowCreated(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
if (e.Row.RowState == DataControlRowState.Alternate)
{
e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor='#FFFFE1';");
e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor='#f7fff8';");
}
else
{
e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor='#FFFFE1';");
e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor='#eefef0';");
}
}
}
No comments:
Post a Comment