间隔相同的颜色:右键DataGrid,指定一下间隔色即可.
鼠标移上去,颜色改变:
private void DataGrid1_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
{
e.Item.Attributes["onmouseover"]="currentcolor=this.style.backgroundColor;this.style.backgroundColor='Gainsboro'";
e.Item.Attributes["onmouseout"]="this.style.backgroundColor=currentcolor";
}
鼠标移上去,颜色改变:
private void DataGrid1_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
{
e.Item.Attributes["onmouseover"]="currentcolor=this.style.backgroundColor;this.style.backgroundColor='Gainsboro'";
e.Item.Attributes["onmouseout"]="this.style.backgroundColor=currentcolor";
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货