我有以下代码来更改网格视图中行的颜色。这很好用,我想要做的是将返回日期值的文本颜色(如果它相同)更改为行的相同颜色,因此无法看到该值。
谁能帮忙?
Protected Sub KitNotReturned(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GridView1.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
Dim dateLoaned As String = DataBinder.Eval(e.Row.DataItem, "DateLoaned")
Dim dateReturend As String = DataBinder.Eval(e.Row.DataItem, "DateReturned")
If dateLoaned = dateReturend Then
e.Row.BackColor = Drawing.Color.HotPink
End If
End If
End Sub
谢谢