I have a VB ASP.NET GridView with the first column as a Hyperlink Field.
Need to change font color of hyperlink text from standard blue to white
in row databound event for just orders that are closed.
I'm already successfully changing cell background color to red in an If-Then statement.
Just need to change URL text to white. Having issues since the URL field is treated differently.
Here is the code block and where I need to change the color:
'Order Status - Open
ing = "False" Then
e.Row.Cells(15).Text = "Open"
e.Row.Cells(4).BackColor = drawing.color.darkseagreen
'Order Status - Closed
e.Row.Cells(15).Text = "Closed"
e.Row.BackColor = Drawing.Color.Firebrick
[CHANGE URL TEXT COLOR WHITE HERE]
I can put in a line of code like this for the first column, but it does NOT change the color of the text because it is a hyperlink - has no effect:
e.Row.Cells(0).ForeColor = drawing.color.white
If I change the zero to a 1 or 2, it changes color of other cells fine. The hyperlink field is causing the issue.