codice:Sub ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) 'esegue solo per gli item If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType = ListItemType.AlternatingItem Then 'aggiunge per ogni riga gli attributi di tipo style e.Item.Attributes.Add("onmouseover", "this.style.backgroundColor='red'") 'esegue nel caso di item alternativo (righe dispari) If e.Item.ItemType = ListItemType.AlternatingItem Then e.Item.Attributes.Add("onmouseout", "this.style.backgroundColor='white'") Else e.Item.Attributes.Add("onmouseout", "this.style.backgroundColor='white'") End If 'modifica il contenuto di una cella di dettaglio creando un link 'e.Item.Cells(1).Text = "" + e.Item.Cells(1).Text + "" End If End Sub