摘要: 代码填写在DataGrid的ItemDataBound事件里:
1if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
2 {
3 e.Item.Attributes["OnMouseOver"] = "style.cursor='hand'; style.backgroundColor='yellow';";
4 e.Item.Attributes["OnMouseOut"] = "style.backgroundColor='white';";
5 e.Item.Attributes["OnClick"] = "window.open('aaa.aspx');";
6 }
行3语句:鼠标指到行时,鼠标变手型,行的底色变为黄色
... ...
阅读全文