protected void grdDeleteUsers_RowCreated(object sender, GridViewRowEventArgs e) { //Colors charts - see http://www.1netcentral.com/color-chart.html string onmouseoverStyle = "this.style.backgroundColor='00BFFF'"; // Deepskyblue string onmouseoutStyle = "this.style.backgroundColor='@BackColor'"; string rowBackColor = String.Empty; if (e.Row.RowType == DataControlRowType.DataRow) { if (e.Row.RowState == DataControlRowState.Alternate) rowBackColor = System.Drawing.ColorTranslator.ToHtml(grdDeleteUsers.AlternatingRowStyle.BackColor).ToString(); else rowBackColor = System.Drawing.ColorTranslator.ToHtml(grdDeleteUsers.RowStyle.BackColor).ToString(); e.Row.Attributes.Add("onmouseover", onmouseoverStyle); e.Row.Attributes.Add("onmouseout", onmouseoutStyle.Replace("@BackColor", rowBackColor)); } }I want to make it generic, so I can easily add highligting to my grids. Note, that in my current implementation I specify grid's name.