Hi all,
I am trying to compare rows and if there is a match between rows then I want to highlight it with a different color. I am working on the below code and so far it just convert the entire row to blue..any help would be appreciated.
eg. if row1=row2 then use blue color
else
use green....something like this
Protected Sub gvLongLat_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles gvLongLat.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
Dim project As String = CType(DataBinder.Eval(e.Row.DataItem, "sp"), String)
If project = project Then
e.Row.BackColor = Drawing.Color.LightSkyBlue
End If
End If
End Sub
I am trying to compare rows and if there is a match between rows then I want to highlight it with a different color. I am working on the below code and so far it just convert the entire row to blue..any help would be appreciated.
eg. if row1=row2 then use blue color
else
use green....something like this
Protected Sub gvLongLat_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles gvLongLat.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
Dim project As String = CType(DataBinder.Eval(e.Row.DataItem, "sp"), String)
If project = project Then
e.Row.BackColor = Drawing.Color.LightSkyBlue
End If
End If
End Sub