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}}