protected void gvcolors_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
int esal = (int)DataBinder.Eval(e.Row.DataItem, "Emp_Sal");
if (esal > 12000)
{
e.Row.ForeColor = System.Drawing.Color.Blue;
e.Row.BackColor = System.Drawing.Color.LightPink;
e.Row.Font.Italic = true;
}
}
}
指定的演员表无效。我正在使用 Emp_Sal , int 数据类型..但它显示一个异常..它是否正确。请帮助我..