ASP.NET in the DataGrid mouse through the perception and click on the line pop-up window

xiaoxiao2021-03-06  109

Select Blog: http://blog.9cbs.net/xujh/ Many people say hard, in fact, this few lines of code. As long as the code is written to the private void DataGrid1_ItemDataBound (object sender, System.Web.UI.WebControls.DataGridItemEventArgs e) {if (e.Item.ItemIndex> = 0) in the DataGrid1 ItemDataBound in this row can be deleted // { // Pop up the window code E.Item.attributes.add ("onclick", "Window.Open ('Webform2.aspx? Zone =" 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';");}}

转载请注明原文地址:https://www.9cbs.com/read-102646.html

New Post(0)