C
chuckdfoster
I have a hyperlink column in my datagrid. I want my hyperlink to be green
or red (depending on in/out status) no matter if the link has been visited
or not. How can I accomplish this? I have tried using CSS but that doesn't
affect what is going on in my datagrid. This is what I have so far for
formatting in my datagrid...
Sub ItemBound(ByVal sender As Object, ByVal e as DataGridItemEventArgs)
If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType =
ListItemType.AlternatingItem Then
'check inout field, if In then font is green, if Out then font is
red
Dim strInOut as String = DataBinder.Eval(e.Item.DataItem, "inout")
If strInOut = "In" then
e.Item.ForeColor = System.Drawing.Color.Green
Else
e.Item.ForeColor = System.Drawing.Color.Red
End If
End If
End Sub
Any advice is greatly appreciated....Thanks in advance!
or red (depending on in/out status) no matter if the link has been visited
or not. How can I accomplish this? I have tried using CSS but that doesn't
affect what is going on in my datagrid. This is what I have so far for
formatting in my datagrid...
Sub ItemBound(ByVal sender As Object, ByVal e as DataGridItemEventArgs)
If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType =
ListItemType.AlternatingItem Then
'check inout field, if In then font is green, if Out then font is
red
Dim strInOut as String = DataBinder.Eval(e.Item.DataItem, "inout")
If strInOut = "In" then
e.Item.ForeColor = System.Drawing.Color.Green
Else
e.Item.ForeColor = System.Drawing.Color.Red
End If
End If
End Sub
Any advice is greatly appreciated....Thanks in advance!