protected void sgvw_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
        this.sgvw.PageIndex = e.NewPageIndex;
        BindSgridView();
    }

1 protected void GridView1_RowCreated(object sender, GridViewRowEventArgs e)
2     {
3         if (e.Row.RowType == DataControlRowType.DataRow )
4         {
5             e.Row.Attributes.Add("onmouseover""currentcolor=this.style.backgroundColor;this.style.backgroundColor='#C0C0FF';this.style.cursor='hand';");
6             //当鼠标移走时还原该行的背景色
7             e.Row.Attributes.Add("onmouseout""this.style.backgroundColor=currentcolor");
8         }
9     }

其中currentcolor=this.style.backgroundColor;最为重要!!!

相关文章:

  • 2021-10-02
  • 2022-02-16
  • 2021-06-17
  • 2021-11-26
  • 2021-07-04
  • 2022-03-05
  • 2022-12-23
  • 2021-08-04
猜你喜欢
  • 2022-12-23
  • 2021-06-21
  • 2021-05-29
  • 2021-12-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案