Gen*_*dia 5 c# asp.net rowdatabound
我有Grd_RowDataBound,我正在将颜色应用到我的GridView Rows.我使用下面的代码在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
}
}
}
Run Code Online (Sandbox Code Playgroud)
请帮忙.
| 归档时间: |
|
| 查看次数: |
8244 次 |
| 最近记录: |