J
Jason Wilson
I would like to change an image in the 1st field in each row of a
gridview based on the content of the other other fields in the row.
Can anyone point me in the right direction?
I tried the following code as a test:
Protected Sub gvRadTurnat_RowCreated(ByVal sender As Object,
ByVal e As GridViewRowEventArgs)
If e.Row.RowType = DataControlRowType.DataRow Then
If CType(DataBinder.Eval(e.Row.DataItem, "193hrs"),
Integer) > 0 Then
e.Row.Cells(0).Style("background-image") =
"redcircle.gif"
End If
End If
End Sub
What I thought this would do is when a row is created if the DataBound
field of "193hrs" had a value greater than 0 it would set the
background image for the cell to "redcircle.gif".
gridview based on the content of the other other fields in the row.
Can anyone point me in the right direction?
I tried the following code as a test:
Protected Sub gvRadTurnat_RowCreated(ByVal sender As Object,
ByVal e As GridViewRowEventArgs)
If e.Row.RowType = DataControlRowType.DataRow Then
If CType(DataBinder.Eval(e.Row.DataItem, "193hrs"),
Integer) > 0 Then
e.Row.Cells(0).Style("background-image") =
"redcircle.gif"
End If
End If
End Sub
What I thought this would do is when a row is created if the DataBound
field of "193hrs" had a value greater than 0 it would set the
background image for the cell to "redcircle.gif".