write this code in RowDatabound of GridView (ASp.net 2)
if (e.Row.RowState == DataControlRowState.Normal)
{
e.Row.Attributes.Add("onmouseover", "chgBg(this,'#ADCBE6')");
e.Row.Attributes.Add("onmouseout", "chgBg(this,'#F8FBFC')");
}
if (e.Row.RowState == DataControlRowState.Alternate)
{
e.Row.Attributes.Add("onmouseover", "chgBg(this,'#ADCBE6')");
e.Row.Attributes.Add("onmouseout", "chgBg(this,'#E6F0F5')");
}
Rishi
|