我有Grd_RowDataBound
并且我正在将颜色应用到我的 GridView 行。我使用了下面的代码,它在 Crome 和 Mozilla 中运行良好,但在 IE11 中不起作用。在 IE11 中,我的 Gridview 行背景颜色不起作用。
protected void Grd_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
string Status = Convert.ToString(DataBinder.Eval(e.Row.DataItem, "Visit_Status"));
if (Status == "1")
{
e.Row.BackColor = ColorTranslator.FromHtml("#28b779");//81F79F
}
else
{
e.Row.BackColor = ColorTranslator.FromHtml("#da5554");//F78181
}
}
}
请帮忙。