62,046
社区成员
发帖
与我相关
我的任务
分享
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if(e.Row.RowType==DataControlRowType.DataRow)
{
if (e.Row.Cells[4].Text.Trim() == "0")
{
e.Row.Cells[4].Text = "<font color=red>隐藏</font>";
}
else
{
e.Row.Cells[4].Text = "公开";
}
if (e.Row.Cells[5].Text.Trim() == "0")
{
e.Row.Cells[5].Text = "<font color=red>新留言</font>";
}
else
{
e.Row.Cells[5].Text = "已回复";
}
}
}