private void DataGrid1_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e){ if(e.Item.ItemIndex>=0) //此行可以删除掉 { //弹出窗口代码e.Item.Attributes.Add("onclick","window.open('WebForm2.aspx?ZoneNo="+e.Item.Cells[0].Text+"','','Toolbar=no')");e.Item.Attributes.Add("onMouseOver","this.style.backgroundColor='#e9e9e9'; this.style.cursor='hand';");e.Item.Attributes.Add("onMouseOut","this.style.backgroundColor='#f7f7f7';"); }}
posted on 2010-05-24 22:50 Ben zhang 阅读(205) 评论(0) 编辑 收藏 举报