Hi
I have below code & i want if value in TextBox is A then color should be Red, If P color should be green.
protected void gr_RowDataBound(object sender, GridViewRowEventArgs e)
{
try
{
if (e.Row.RowType != DataControlRowType.DataRow)
return;
e.Row.Cells[0].HorizontalAlign = HorizontalAlign.Center;
//e.Row.Cells[0].BackColor = ColorTranslator.FromHtml("#03a9f4");
//e.Row.Cells[0].ForeColor = ColorTranslator.FromHtml("#fff");
}
catch (Exception ex)
{
Utility.SaveErrorLog(ex.Message, System.IO.Path.GetFileName(Request.Path), System.Reflection.MethodBase.GetCurrentMethod().Name, Convert.ToInt32(hdfLoginCode.Value));
ShowMessage("Oops...", ex.Message, "error");
}
}
Thanks