如果 endTimeStamp 行的项目等于“0001-01-01 00:00:00.0000000”,我已经创建了此代码来更改行的颜色,它会更改行但也会更改标题我想问我如何定位项目行没有标题
protected void gv_timesheet_RowDataBound(object sender, GridViewRowEventArgs e)
{
//To check condition on date time
if (Convert.ToDateTime(DataBinder.Eval(e.Row.DataItem, "endTimeStamp")) == Convert.ToDateTime("0001-01-01 00:00:00.0000000"))
{
e.Row.BackColor = System.Drawing.Color.Red;
}
}