how to change row background color in gridview
Sneha Panda
Select an image from your device to upload
protected void gridview1_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { Label lbl_Code = (Label)e.Row.FindControl(“lblCode”); if (lbl_Code.Text == “1”) { e.Row.BackColor = System.Drawing.ColorTranslator.FromHtml(“#f2d9d9”); } } }