在DataGrid中,使鼠标到达的行和列显示不同的颜色? 在DataGrid中,使鼠标到达的行和列显示不同的颜色 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 private void grdCustomer_ItemDataBound(object sender,System.Web.UI.WebControls.DataGridItemEventArgs e){ if(e.Item.ItemType == ListItemType.AlternatingItem || e.Item.ItemType == ListItemType.Item ) { e.Item.Attributes.Add("onmouseover", "this.oldcolor=this.style.backgroundColor;this.style.backgroundColor='#C8F7FF'"); e.Item.Attributes.Add("onmouseout", "this.style.backgroundColor=this.oldcolor"); for (int i = 0; i< grdCustomer.Columns.Count; i++ ) { e.Item.Cells[i].Attributes.Add("onmouseover", "this.oldcolor=this.style.backgroundColor;this.style.backgroundColor='#99ccff'"); e.Item.Cells[i].Attributes.Add("onmouseout", "this.style.backgroundColor=this.oldcolor"); } }} winform在使用委托时为什么总是“未将对象引用设置到对象的实例” c# 怎么样设置窗口透明度并且保持窗体中的某些东西不透明? 求一正则表达式,并希望大家能介绍几本关于其的好书!谢谢了 ajax帮忙!! 求高手详细的标注一下这段代码,越详细越好。 问各位一个很傻的问题!1 莱鸟,请教,请教!急!!!!!! 一个关于输入框文字色彩的问题 3DES加密算法 在 C# 中,字符串怎么没有 pos 函数。 急问:多多谢谢 如何把DNS转成IP地址?
{
if(e.Item.ItemType == ListItemType.AlternatingItem || e.Item.ItemType == ListItemType.Item )
{
e.Item.Attributes.Add("onmouseover", "this.oldcolor=this.style.backgroundColor;this.style.backgroundColor='#C8F7FF'");
e.Item.Attributes.Add("onmouseout", "this.style.backgroundColor=this.oldcolor");
for (int i = 0; i< grdCustomer.Columns.Count; i++ )
{
e.Item.Cells[i].Attributes.Add("onmouseover", "this.oldcolor=this.style.backgroundColor;this.style.backgroundColor='#99ccff'");
e.Item.Cells[i].Attributes.Add("onmouseout", "this.style.backgroundColor=this.oldcolor");
}
}
}