protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes.Add("ondblclick", "window.open('HTMLPage.htm')");
e.Row.Cells[2].Text = Convert.ToDateTime(e.Row.Cells[2].Text).ToShortDateString();
e.Row.Attributes.Add("onmouseover","this.style.backgroundColor='#FFFFCC';this.style.color='buttontext';this.cursor='default';");
e.Row.Attributes.Add("onmouseout","this.style.backgroundColor='';this.style.color='';");
}
}
gridview的变色
最新推荐文章于 2018-04-18 11:18:51 发布