控件绑定时触发事件(_RowDataBound事件)
protected void gvXw_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes.Add("onMouseOver", "Color=this.style.backgroundColor;this.style.backgroundColor='lightBlue'");
e.Row.Attributes.Add("onMouseOut", "this.style.backgroundColor=Color;");
e.Row.Cells[1].Text = Convert.ToDateTime(e.Row.Cells[1].Text).ToShortDateString();
}
}