Use scripts on DataGrid!

zhaozj2021-02-16  54

private void DataGrid1_ItemDataBound (object sender, System.Web.UI.WebControls.DataGridItemEventArgs e) {// Header Analyzing and Footer if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) {E.Item.attributes.add ("onMouseover", "this.style.BackgroundColor = 'red'"); E.Item.attributes.add ("onmouseout", "this.style.BackgroundColor = 'White'") ; // Reason for nothing -> backgrundcolor ----> backgroudcolor}}

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

New Post(0)