The mouse is moving time color and can be hit from the line.

zhaozj2021-02-16  103

// The first column needs to be placed in a linkButton column to select the line private void dataGrid1_itemdatabase (Object Sender, System.Web.ui.WebControls.DataGriditeMeventArgs E)

{

IF (E.Item.ItemType == ListItemType.alternatingItem || E.Item.ItemType == ListItemType.Item) {

E.Item.attributes ["onmouseout"] = "this.style.backgroundcolor = '# fffcc'";

E.Item.attributes ["onmouseover"] = "this.style.backroundcolor = 'lightgreen'";

LinkButton Button = (LinkButton) E.Item.cells [0] .controls [0];

E.Item.attributes ["onclick"] = page.getPostBackClienthyperLink (Button, "");

}

}

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

New Post(0)