// DataGrid Style: private void DataGrid1_ItemDataBound (object sender, System.Web.UI.WebControls.DataGridItemEventArgs e) {if (e.Item.ItemType = ListItemType.Header!) {E.Item.Attributes.Add ( "onmouseover", "this.oldcolor = this.style.backgroundcolor; this.style.backgroundcolor = '# c8f7ff'"); E.Item.attributes.add ("onmouseout", "this.style.BackgroundColor = this.oldcolor"; e .Item.attributes.add ("onclick", "this.style.backgroundcolor = 'red'; this.style.cursor = 'hand';");}}
// DataList style:
Write a table in the DataList's itemtemplate, where TR is set