![ContractedBlock.gif](https://i-blog.csdnimg.cn/blog_migrate/8f900a89c6347c561fdf2122f13be562.gif)
![ExpandedBlockStart.gif](https://i-blog.csdnimg.cn/blog_migrate/961ddebeb323a10fe0623af514929fc1.gif)
protected
void
GridView1_RowDataBound(
object
sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes.Add( " onmouseover " , " currentcolor=this.style.backgroundColor; this.style.backgroundColor='red' " );
e.Row.Attributes.Add( " onmouseout " , " this.style.backgroundColor=currentcolor " );
}
}
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes.Add( " onmouseover " , " currentcolor=this.style.backgroundColor; this.style.backgroundColor='red' " );
e.Row.Attributes.Add( " onmouseout " , " this.style.backgroundColor=currentcolor " );
}
}